Improve udp dns close

This commit is contained in:
世界
2022-07-24 21:25:41 +08:00
parent fde33fbb30
commit 9e9e6f7ee6
2 changed files with 57 additions and 29 deletions

View File

@@ -325,7 +325,7 @@ func (a *myInboundAdapter) NewError(ctx context.Context, err error) {
func NewError(logger log.ContextLogger, ctx context.Context, err error) {
common.Close(err)
if E.IsClosedOrCanceled(err) {
logger.DebugContext(ctx, "connection closed")
logger.TraceContext(ctx, "connection closed: ", err)
return
}
logger.ErrorContext(ctx, err)