aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-09 00:15:21 +0700
committerShulhan <ms@kilabit.info>2023-11-09 20:26:43 +0700
commit159cd136ff12cf1c269c57e942479b2cf46d1fcc (patch)
tree305b5044cbc8463341acb2c650ce6f366b3d5c4f /server.go
parentda3f7b22ecb75681814f22b708e05a5becb699f1 (diff)
downloadciigo-159cd136ff12cf1c269c57e942479b2cf46d1fcc.tar.xz
all: add method to stop watcher
With the latest update on lib/memfs, we can stop the watcher internally.
Diffstat (limited to 'server.go')
-rw-r--r--server.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.go b/server.go
index 384b164..778ca5d 100644
--- a/server.go
+++ b/server.go
@@ -129,6 +129,10 @@ func (srv *server) start() (err error) {
return fmt.Errorf(`%s: %w`, logp, err)
}
+ if srv.opts.IsDevelopment {
+ srv.watcher.stop()
+ }
+
return nil
}