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:
443443
444444 conn = None
445445 try :
446+ if self .debug :
447+ _debug_start_time = monotonic ()
448+
446449 conn , client_address = self ._sock .accept ()
447450 conn .settimeout (self ._timeout )
448451
449- _debug_start_time = monotonic ()
450-
451452 # Receive the whole request
452453 if (request := self ._receive_request (conn , client_address )) is None :
453454 conn .close ()
@@ -468,9 +469,8 @@ def poll(self) -> str:
468469 # Send the response
469470 response ._send () # pylint: disable=protected-access
470471
471- _debug_end_time = monotonic ()
472-
473472 if self .debug :
473+ _debug_end_time = monotonic ()
474474 _debug_response_sent (response , _debug_end_time - _debug_start_time )
475475
476476 return REQUEST_HANDLED_RESPONSE_SENT
You can’t perform that action at this time.
0 commit comments