From 646e71a54146e050a132405e57d454da3e159ff9 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Fri, 20 Oct 2023 11:33:39 -0700 Subject: [PATCH] buildkitd: fix debug handler listener Signed-off-by: Tonis Tiigi (cherry picked from commit 7f8eedcf6a20ea7e7b47988fcaf6586882d85da9) --- cmd/buildkitd/debug.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }