Skip to content

Commit

Permalink
Fix reports routing and http.Server usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
riannucci committed Oct 28, 2021
1 parent badebba commit be5a1dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goconvey.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ func serveHTTP(reports string, server contract.Server, listener net.Listener) *h
http.HandleFunc("/status/poll", server.LongPollStatus)
http.HandleFunc("/pause", server.TogglePause)

http.Handle("/reports", http.FileServer(http.Dir(reports)))
http.Handle("/reports/", http.StripPrefix("/reports/", http.FileServer(http.Dir(reports))))

log.Printf("Serving HTTP at: http://%s\n", listener.Addr())
ret := &http.Server{}
go func() {
err := http.Serve(listener, nil)
err := ret.Serve(listener)
if err != nil {
log.Println(err)
}
Expand Down

0 comments on commit be5a1dc

Please sign in to comment.