Commit b06106f4 authored by Eric's avatar Eric

[update] add close for httpd

parent c5f287bb
......@@ -29,6 +29,7 @@ func (c *Coco) Start() {
func (c *Coco) Stop() {
sshd.StopServer()
httpd.StopHTTPServer()
logger.Debug("Quit The Coco")
}
......
......@@ -52,3 +52,7 @@ func StartHTTPServer() {
httpServer = &http.Server{Addr: addr, Handler: router}
logger.Fatal(httpServer.ListenAndServe())
}
func StopHTTPServer() {
_ = httpServer.Close()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment