diff --git a/httpcore/_async/http11.py b/httpcore/_async/http11.py index 5d6ee440..d484a625 100644 --- a/httpcore/_async/http11.py +++ b/httpcore/_async/http11.py @@ -68,8 +68,6 @@ def __init__( our_role=h11.CLIENT, max_incomplete_event_size=self.MAX_INCOMPLETE_EVENT_SIZE, ) - # Assuming we were just connected - self._network_stream_used_at = time.monotonic() async def handle_async_request(self, request: Request) -> Response: if not self.can_handle_request(request.url.origin): @@ -185,7 +183,6 @@ async def _send_event( bytes_to_send = self._h11_state.send(event) if bytes_to_send is not None: await self._network_stream.write(bytes_to_send, timeout=timeout) - self._network_stream_used_at = time.monotonic() # Receiving the response... @@ -237,7 +234,6 @@ async def _receive_event( data = await self._network_stream.read( self.READ_NUM_BYTES, timeout=timeout ) - self._network_stream_used_at = time.monotonic() # If we feed this case through h11 we'll raise an exception like: # diff --git a/httpcore/_sync/http11.py b/httpcore/_sync/http11.py index 33342fb6..f276bdad 100644 --- a/httpcore/_sync/http11.py +++ b/httpcore/_sync/http11.py @@ -68,8 +68,6 @@ def __init__( our_role=h11.CLIENT, max_incomplete_event_size=self.MAX_INCOMPLETE_EVENT_SIZE, ) - # Assuming we were just connected - self._network_stream_used_at = time.monotonic() def handle_request(self, request: Request) -> Response: if not self.can_handle_request(request.url.origin): @@ -185,7 +183,6 @@ def _send_event( bytes_to_send = self._h11_state.send(event) if bytes_to_send is not None: self._network_stream.write(bytes_to_send, timeout=timeout) - self._network_stream_used_at = time.monotonic() # Receiving the response... @@ -237,7 +234,6 @@ def _receive_event( data = self._network_stream.read( self.READ_NUM_BYTES, timeout=timeout ) - self._network_stream_used_at = time.monotonic() # If we feed this case through h11 we'll raise an exception like: #