File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1231,7 +1231,8 @@ async def keepalive_ping(self) -> None:
1231
1231
while True :
1232
1232
await asyncio .sleep (self .ping_interval )
1233
1233
1234
- self .logger .debug ("% sending keepalive ping" )
1234
+ if self .debug :
1235
+ self .logger .debug ("% sending keepalive ping" )
1235
1236
pong_waiter = await self .ping ()
1236
1237
1237
1238
if self .ping_timeout is not None :
@@ -1242,7 +1243,8 @@ async def keepalive_ping(self) -> None:
1242
1243
# Raises ConnectionClosed if the connection is lost,
1243
1244
# when connection_lost() calls abort_pings().
1244
1245
await pong_waiter
1245
- self .logger .debug ("% received keepalive pong" )
1246
+ if self .debug :
1247
+ self .logger .debug ("% received keepalive pong" )
1246
1248
except asyncio .TimeoutError :
1247
1249
if self .debug :
1248
1250
self .logger .debug ("- timed out waiting for keepalive pong" )
@@ -1469,7 +1471,8 @@ def connection_lost(self, exc: Exception | None) -> None:
1469
1471
1470
1472
"""
1471
1473
self .state = State .CLOSED
1472
- self .logger .debug ("= connection is CLOSED" )
1474
+ if self .debug :
1475
+ self .logger .debug ("= connection is CLOSED" )
1473
1476
1474
1477
self .abort_pings ()
1475
1478
You can’t perform that action at this time.
0 commit comments