diff --git a/cmd/buildkitd/debug.go b/cmd/buildkitd/debug.go index 80e87a6f81ab..fd7a0963b8dc 100644 --- a/cmd/buildkitd/debug.go +++ b/cmd/buildkitd/debug.go @@ -43,6 +43,10 @@ func setupDebugHandlers(addr string) error { ReadHeaderTimeout: time.Minute, } bklog.L.Debugf("debug handlers listening at %s", addr) - go server.ListenAndServe() + go func() { + if err := server.Serve(l); err != nil { + bklog.L.Errorf("failed to serve debug handlers: %v", err) + } + }() return nil }