Skip to content

Commit 7c231e2

Browse files
committed
Improve handshake logging
1 parent d316b24 commit 7c231e2

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/neo4j/_async/io/_bolt_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ async def _handshake(self, resolved_address, deadline):
242242
response = await self._handshake_read(ctx, 4)
243243

244244
if response == b"HTTP":
245-
log.debug("[#%04X] S: <CLOSE>", local_port)
245+
log.debug("[#%04X] C: <CLOSE> (received b'HTTP')", local_port)
246246
await self.close()
247247
raise ServiceUnavailable(
248248
f"Cannot to connect to Bolt service on {resolved_address!r} "

src/neo4j/_sync/io/_bolt_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def _handshake(self, resolved_address, deadline):
242242
response = self._handshake_read(ctx, 4)
243243

244244
if response == b"HTTP":
245-
log.debug("[#%04X] S: <CLOSE>", local_port)
245+
log.debug("[#%04X] C: <CLOSE> (received b'HTTP')", local_port)
246246
self.close()
247247
raise ServiceUnavailable(
248248
f"Cannot to connect to Bolt service on {resolved_address!r} "

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ requires = virtualenv<20.22.0
55

66
[testenv]
77
passenv = TEST_*
8+
deps = -r requirements-dev.txt
89
setenv =
910
COVERAGE_FILE={envdir}/.coverage
1011
TEST_SUITE_NAME={envname}

0 commit comments

Comments
 (0)