This commit is contained in:
Mike Schwörer 2023-07-24 18:38:04 +02:00
parent d04ce18eb0
commit ede0b99d3a
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 6 additions and 3 deletions

View File

@ -68,6 +68,9 @@ func NewEngine(allowCors bool, ginDebug bool, timeout time.Duration) *GinWrapper
} }
func (w *GinWrapper) ListenAndServeHTTP(addr string, postInit func(port string)) (chan error, *http.Server) { func (w *GinWrapper) ListenAndServeHTTP(addr string, postInit func(port string)) (chan error, *http.Server) {
w.DebugPrintRoutes()
httpserver := &http.Server{ httpserver := &http.Server{
Addr: addr, Addr: addr,
Handler: w.engine, Handler: w.engine,
@ -92,7 +95,7 @@ func (w *GinWrapper) ListenAndServeHTTP(addr string, postInit func(port string))
log.Info().Str("address", httpserver.Addr).Msg("HTTP-Server started on http://localhost:" + port) log.Info().Str("address", httpserver.Addr).Msg("HTTP-Server started on http://localhost:" + port)
if postInit != nil { if postInit != nil {
postInit(port) postInit(port) // the net.Listener a few lines above is at this point actually already buffering requests
} }
errChan <- httpserver.Serve(ln) errChan <- httpserver.Serve(ln)

View File

@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.202" const GoextVersion = "0.0.203"
const GoextVersionTimestamp = "2023-07-24T18:34:56+0200" const GoextVersionTimestamp = "2023-07-24T18:38:04+0200"