Skip to content

Commit 4fa9784

Browse files
committed
disable file watching by default until I find a solution
1 parent 95e5431 commit 4fa9784

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

httpserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type Server struct {
3030
shutdownTimeout time.Duration
3131
listenAddress string
3232
mode Mode
33+
watchEnabled bool
3334

3435
HTTPServer *http.Server
3536
log *slog.Logger
@@ -156,6 +157,9 @@ func (s *Server) startGracefulShutdown() error {
156157
}
157158

158159
func (s *Server) handleFileChange(event notify.EventInfo) {
160+
if !s.watchEnabled {
161+
return
162+
}
159163
isGoFile := strings.HasSuffix(event.Path(), ".go")
160164
if !isGoFile {
161165
return

0 commit comments

Comments
 (0)