Skip to content

Fix BrowserChannel close when is already closing #1169

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 1 commit into from
Dec 27, 2023

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Dec 27, 2023

WebSockets can take a while for closing, and when WebSocket.close is called while the status is WS_CLOSING, an error is thrown.

This situation can happen when the driver is being closed while sessions are still releasing connections back to the pool or after a receive timeout while closing the session.

BrowserChannel should wait for the original close socket to finish whenever a new close request happens to avoid this kind of error and provide a graceful shutdown for driver and session.

WebSockets can take a while for closing and the `WebSocket.close` is
called when status is `WS_CLOSING`, an error is thrown.

This situation can happen when the driver is being closed while session
still releasing connections back to the pool or after a receive timeout
while closing the session.

BrowserChannel should wait for the original close socket finish whenever
a new close request happens to avoid this kind of error and provides a
graceful shutdown for driver and session.
Copy link
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⛱️

@bigmontz bigmontz merged commit 56d77c1 into neo4j:5.0 Dec 27, 2023
@bigmontz bigmontz deleted the 5.x-improve-browser-channel-close branch December 27, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants