Skip to content

Don't handle raw socket after it's wrapped in connection #530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions neo4j/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
)
from neo4j.routing import RoutingTable


# Set up logger
log = getLogger("neo4j")

Expand Down Expand Up @@ -247,9 +248,8 @@ def open(cls, address, *, auth=None, timeout=None, routing_context=None, **pool_

try:
connection.hello()
except Exception as error:
log.debug("[#%04X] C: <CLOSE> %s", s.getsockname()[1], str(error))
_close_socket(s)
except Exception:
connection.close()
raise

return connection
Expand Down