mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-03-06 11:40:27 +00:00
Merge pull request #93 from Random-Liu/fix-http-server
Create a goroutine for the http server.
This commit is contained in:
@@ -44,10 +44,12 @@ func startHTTPServer(p problemdetector.ProblemDetector, npdo *options.NodeProble
|
||||
p.RegisterHTTPHandlers()
|
||||
|
||||
addr := net.JoinHostPort(npdo.ServerAddress, strconv.Itoa(npdo.ServerPort))
|
||||
err := http.ListenAndServe(addr, nil)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to start server: %v", err)
|
||||
}
|
||||
go func() {
|
||||
err := http.ListenAndServe(addr, nil)
|
||||
if err != nil {
|
||||
glog.Fatalf("Failed to start server: %v", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user