🔇 减少启动日志监听端口耗时

This commit is contained in:
Liang Ding 2022-12-07 10:51:49 +08:00
parent d1995bda5c
commit e11886923c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -85,7 +85,6 @@ func Serve(fastMode bool) {
host = "127.0.0.1"
}
now := time.Now()
ln, err := net.Listen("tcp", host+":"+util.ServerPort)
if nil != err {
if !fastMode {
@ -105,7 +104,6 @@ func Serve(fastMode bool) {
}
}
util.ServerPort = port
logging.LogInfof("listen port elapsed [%dms]", time.Since(now).Milliseconds())
pid := fmt.Sprintf("%d", os.Getpid())
if !fastMode {