Skip to content

Commit

Permalink
Remove error checking for server, breaks on correct stop
Browse files Browse the repository at this point in the history
  • Loading branch information
arminc committed Sep 24, 2017
1 parent 40f77fa commit cec2a16
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ func httpFileServer(path string) *http.Server {
server := &http.Server{Addr: ":" + httpPort}
http.Handle("/", http.FileServer(http.Dir(path)))
go func() {
if err := server.ListenAndServe(); err != nil {
Logger.Fatalf("An error occurred when starting HTTP server: %s", err)
}
server.ListenAndServe()
}()
time.Sleep(100 * time.Millisecond)
Logger.Info("Server listening on port %s", httpPort)
Logger.Infof("Server listening on port %s", httpPort)
return server
}

0 comments on commit cec2a16

Please sign in to comment.