File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -443,11 +443,12 @@ def poll(self) -> str:
443
443
444
444
conn = None
445
445
try :
446
+ if self .debug :
447
+ _debug_start_time = monotonic ()
448
+
446
449
conn , client_address = self ._sock .accept ()
447
450
conn .settimeout (self ._timeout )
448
451
449
- _debug_start_time = monotonic ()
450
-
451
452
# Receive the whole request
452
453
if (request := self ._receive_request (conn , client_address )) is None :
453
454
conn .close ()
@@ -468,9 +469,8 @@ def poll(self) -> str:
468
469
# Send the response
469
470
response ._send () # pylint: disable=protected-access
470
471
471
- _debug_end_time = monotonic ()
472
-
473
472
if self .debug :
473
+ _debug_end_time = monotonic ()
474
474
_debug_response_sent (response , _debug_end_time - _debug_start_time )
475
475
476
476
return REQUEST_HANDLED_RESPONSE_SENT
You can’t perform that action at this time.
0 commit comments