试图修复udp close无效的问题,可能导致 too many opened sockets.

This commit is contained in:
hahahrfool
2022-04-02 09:24:15 +08:00
parent ca58a1ab3c
commit a8654e198e
5 changed files with 52 additions and 11 deletions

View File

@@ -95,3 +95,10 @@ func CanLogDebug(msg string) *zapcore.CheckedEntry {
return ZapLogger.Check(zap.DebugLevel, msg)
}
func CanLogFatal(msg string) *zapcore.CheckedEntry {
if LogLevel > Log_fatal {
return nil
}
return ZapLogger.Check(zap.FatalLevel, msg)
}