增加主动断开

This commit is contained in:
boyce
2019-03-06 09:22:14 +08:00
parent c74a8a5318
commit 3e5a288de7
2 changed files with 21 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ import (
"net/http"
"os"
"time"
"github.com/duanhf2012/origin/service"
"github.com/duanhf2012/origin/sysmodule"
)
type HttpServer struct {
@@ -54,6 +57,7 @@ func (slf *HttpServer) startListen() error {
}
if err != nil {
service.GetLogger().Printf(sysmodule.LEVER_FATAL, "http.ListenAndServe(%d, nil) error:%v\n", listenPort, err)
fmt.Printf("http.ListenAndServe(%d, %v) error\n", slf.port, err)
os.Exit(1)
}