Skip to content
New issue

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

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

Already on GitHub? # to your account

Suppress subsequent connection errors into existing error #594

Merged
merged 2 commits into from
Apr 29, 2019

Conversation

zhenlineo
Copy link
Contributor

@zhenlineo zhenlineo commented Apr 25, 2019

When a server is shutting down, it is possible that a transaction is killed in the middle, followed by the termination of connection. Before the connection is shutting down, the server might send an error message if there is at least one pending message sent by client. However the server will also ignore any further messages that are queued in the server inbound message queue. Thus when the client trying to send or reading more with the closed connection, the client will receive a connection terminated error.

This PR makes sure when the above situation happens, the client will throw the original error with connection error as suppressed error.

…ors if any.

When a server is shutting down, it is possible that a transaction is killed in the middle, followed by the termination of connection. Before the connection is shutting down, the server might send an error message if there is at least one pending message sent by client. However the server will also ignore any further messages that are queued in the server inbound message queue. Thus when the client trying to send or reading more with the closed connection, the client will receive a connection terminated error.

This PR makes sure when the above situation happens, the client will throw the original error first.
@zhenlineo zhenlineo requested a review from ali-ince April 26, 2019 11:21
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

LGTM.

@ali-ince ali-ince merged commit a86ea1d into neo4j:1.7 Apr 29, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants