Fix Printing of session ID on close event.#56
Merged
svenvc merged 1 commit intosvenvc:masterfrom Nov 29, 2025
Merged
Conversation
…nnection ID in the close event
Owner
|
Thank you ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the current implementation of
P3Client>>close, the closing of the driver nullifies the session id variable and when the log tries to print it, it does not have the value. The result is that the log prints the connect and disconnect events as:moving the log printing event before calling close, allows to see the connection ID in the close event, which helps keep track of the lifetime of the connection.
In the current implementation, the
connection closeis sent inside a protected block with an empty error handler, so I think it does not matter if the log event is sent before or after. If the error handler was different, then the solution would be to create the log signal before the close command and then emit the signal after it occurred. If this is preferred, let me know and I can update the code for the PR.