Browse Source

Panic if http.Serve() returns an error

Jakob Borg 11 years ago
parent
commit
0b1136ad82
1 changed files with 6 additions and 1 deletions
  1. 6 1
      cmd/syncthing/gui.go

+ 6 - 1
cmd/syncthing/gui.go

@@ -140,7 +140,12 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
 		handler = redirectToHTTPSMiddleware(handler)
 	}
 
-	go http.Serve(listener, handler)
+	go func() {
+		err := http.Serve(listener, handler)
+		if err != nil {
+			panic(err)
+		}
+	}()
 	return nil
 }