Log potential errors returned by http.ListenAndServe (#345)

This commit is contained in:
Christian Muehlhaeuser 2020-11-12 21:42:18 +01:00 committed by GitHub
parent e83cca9338
commit 8d9eb1e79f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,13 @@ func (s *FileWriterReceiverService) SetupFileWriterReceiverService(callbacks Fil
httpServer.HandleFunc("/", s.uploadHandler)
localListenerAddress := "127.0.0.1:" + strconv.Itoa(config.Config.GetPublicWebServerPort()+1)
go http.ListenAndServe(localListenerAddress, httpServer)
go func() {
if err := http.ListenAndServe(localListenerAddress, httpServer); err != nil {
log.Fatal(err)
}
}()
log.Traceln("Transcoder response listening on: " + localListenerAddress)
}