2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-21 16:39:32 +00:00

When closing connection, don't raise issues about connection being closed in unexpected ways.

This commit is contained in:
Jarrod Johnson
2026-08-19 14:01:40 -04:00
parent cf14bda3b7
commit 58d36a2b14
+4 -1
View File
@@ -209,7 +209,10 @@ def get_socket(handle):
async def close(handle):
if isinstance(handle, tuple):
handle[1].close()
await handle[1].wait_closed()
try:
await handle[1].wait_closed()
except Exception:
pass
else:
handle.close()