From de4bd13765db6fd200ba7ff31e81d8f4d64a5f51 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 5 Jun 2026 15:55:38 +0200 Subject: [PATCH] Fix async driver waiting for OS on closing half-open socket This change aligns the async driver better with the sync driver. When a socket is closed, we don't want to wait until the OS acknowledges that the channel has been fully torn down. It's sufficient to initiate the closure. The rest we'll leave to the OS's TCP stack (and potentially other intermediates such as TLS wrappers) or the async runtime to figure out in the background. --- src/neo4j/_async_compat/network/_bolt_socket.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/neo4j/_async_compat/network/_bolt_socket.py b/src/neo4j/_async_compat/network/_bolt_socket.py index 42f35afbd..e2b582808 100644 --- a/src/neo4j/_async_compat/network/_bolt_socket.py +++ b/src/neo4j/_async_compat/network/_bolt_socket.py @@ -192,7 +192,6 @@ async def sendall(self, data): async def close(self): self._writer.close() - await self._writer.wait_closed() def kill(self): self._writer.close()