-
-
Notifications
You must be signed in to change notification settings - Fork 127
fix(conn): log benign server recycles quietly without hiding real errors #785
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,7 +90,19 @@ impl Client { | |
| } | ||
| Err(e) => { | ||
| let result = classify_keepalive_error(&e); | ||
| warn!(target: "Client/Keepalive", "Keepalive ping failed: {e:?}"); | ||
| // A fatal-classified error means the connection is already gone | ||
| // (e.g. NotConnected): the disconnect is being handled elsewhere, so | ||
| // this ping failure is benign teardown collateral, not a keepalive | ||
| // problem. A transient failure (timeout, unexpected server response) | ||
| // is a real keepalive issue and stays loud. | ||
| match result { | ||
| KeepaliveResult::FatalFailure => { | ||
| debug!(target: "Client/Keepalive", "Keepalive skipped, connection already closing: {e:?}"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This debug branch now covers every Useful? React with 👍 / 👎. |
||
| } | ||
| KeepaliveResult::TransientFailure | KeepaliveResult::Ok => { | ||
| warn!(target: "Client/Keepalive", "Keepalive ping failed: {e:?}"); | ||
| } | ||
| } | ||
| result | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the transport event channel closes without delivering a
Disconnectedevent,read_messages_looptakes theErr(_)branch insrc/client/node_io.rsand only emits a debug message before returningErr("Transport event channel closed"). This new generic debug log is therefore the only record of that unexpected disconnect, so custom/buggy transports that drop the sender without a reason will reconnect and dispatchDisconnectedwithout any warn/error even though the cause was not classified as clean.Useful? React with 👍 / 👎.