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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user