File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -567,8 +567,13 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
567
567
_ cleanup: ConnectionStateMachine . ConnectionAction . CleanUpContext ,
568
568
context: ChannelHandlerContext
569
569
) {
570
- self . logger. debug ( " Cleaning up and closing connection. " , metadata: [ . error: " \( cleanup. error) " ] )
571
-
570
+ // Don't log a misleading error if the client closed the connection.
571
+ if cleanup. error. code == . clientClosedConnection {
572
+ self . logger. debug ( " Cleaning up and closing connection. " )
573
+ } else {
574
+ self . logger. debug ( " Cleaning up and closing connection. " , metadata: [ . error: " \( cleanup. error) " ] )
575
+ }
576
+
572
577
// 1. fail all tasks
573
578
cleanup. tasks. forEach { task in
574
579
task. failWithError ( cleanup. error)
You can’t perform that action at this time.
0 commit comments