neo4j / neo4j-python-driver

Neo4j Bolt driver for Python
https://neo4j.com/docs/api/python-driver/current/
Other
895 stars 186 forks source link

[4.4] Harden driver against unexpected RESET responses #1042

Closed robsdedude closed 5 months ago

robsdedude commented 5 months ago

The server has been observed to reply with FAILURE and IGNORED to RESET requests. The former is according to spec and the driver should drop the connection (which it didn't), the latter isn't.

The right combination of those two unexpected responses at the right time could get the driver stuck in an infinite loop.

This change makes the driver drop the connection in either case to gracefully handle the situation.

Backport of: https://github.com/neo4j/neo4j-python-driver/pull/1006