Skip to content

Commit

Permalink
Merge pull request #648 from smartystreets/smallBugs
Browse files Browse the repository at this point in the history
Fix reports routing and http.Server usage.
  • Loading branch information
riannucci committed Oct 28, 2021
2 parents badebba + be5a1dc commit 2fa2eeb
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 2fa2eeb

Please sign in to comment.