diff --git a/libnetwork/diagnostic/server.go b/libnetwork/diagnostic/server.go index 966201c448..c773b96918 100644 --- a/libnetwork/diagnostic/server.go +++ b/libnetwork/diagnostic/server.go @@ -147,9 +147,11 @@ func (s *Server) help(w http.ResponseWriter, r *http.Request) { }).Info("help done") var result string + s.mu.Lock() for path := range s.handlers { result += fmt.Sprintf("%s\n", path) } + s.mu.Unlock() _, _ = HTTPReply(w, CommandSucceed(&StringCmd{Info: result}), jsonOutput) }