about summary refs log tree commit diff stats
path: root/internal/server
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/dev.go3
-rw-r--r--internal/server/server.go4
2 files changed, 4 insertions, 3 deletions
diff --git a/internal/server/dev.go b/internal/server/dev.go
index 7898a09..0763065 100644
--- a/internal/server/dev.go
+++ b/internal/server/dev.go
@@ -90,7 +90,8 @@ func (watcher FileWatcher) Start(callback func(string)) {
 						}
 					}
 				}
-				if event.Has(fsnotify.Rename) || event.Has(fsnotify.Write) {
+				if event.Has(fsnotify.Rename) || event.Has(fsnotify.Write) ||
+					event.Has(fsnotify.Create) || event.Has(fsnotify.Chmod) {
 					if timer == nil {
 						timer = time.AfterFunc(checkSettleInterval, func() {
 							callback(event.Name)
diff --git a/internal/server/server.go b/internal/server/server.go
index b9db417..60b20d2 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -173,9 +173,9 @@ func New(runtimeConfig *Config) (*Server, error) {
 func (s *Server) serve(tls bool) error {
 	if tls {
 		return s.serveTLS()
-	} else {
-		return s.serveTCP()
 	}
+
+	return s.serveTCP()
 }
 
 func (s *Server) Start() error {