Skip to content

Commit a9fb317

Browse files
close aiohttp session when disconnecting (Fixes #272)
1 parent 06480be commit a9fb317

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/engineio/asyncio_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ async def disconnect(self, abort=False):
158158
client.connected_clients.remove(self)
159159
except ValueError: # pragma: no cover
160160
pass
161+
if self.http and not self.http.closed:
162+
await self.http.close()
161163
self._reset()
162164

163165
def start_background_task(self, target, *args, **kwargs):

0 commit comments

Comments
 (0)