Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httpcore/_async/http2.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ async def _receive_remote_settings_change(

async def _response_closed(self, stream_id: int) -> None:
await self._max_streams_semaphore.release()
del self._events[stream_id]
async with self._state_lock:
del self._events[stream_id]
if self._connection_terminated and not self._events:
await self.aclose()

Expand Down
2 changes: 1 addition & 1 deletion httpcore/_sync/http2.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ def _receive_remote_settings_change(

def _response_closed(self, stream_id: int) -> None:
self._max_streams_semaphore.release()
del self._events[stream_id]
with self._state_lock:
del self._events[stream_id]
if self._connection_terminated and not self._events:
self.close()

Expand Down