Skip to content
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

chore(bolt-sidecar): log unexpected websocket messages #680

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
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
17 changes: 16 additions & 1 deletion bolt-sidecar/src/api/commitments/firewall/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,22 @@ impl Future for CommitmentRequestProcessor {
warn!(?rpc_url, "websocket connection closed by server");
return Poll::Ready(InterruptReason::ConnectionClosed);
}
Ok(_) => {} // ignore other message types
Ok(Message::Binary(data)) => {
warn!(
?rpc_url,
bytes_len = data.len(),
"received unexpected binary message"
);
Copy link
Collaborator

@merklefruit merklefruit Jan 15, 2025

Choose a reason for hiding this comment

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

I suggest turning this down to debug! or trace! level, as it would be great to keep warnings for stuff that we need to take action or be careful of. same for Message::Frame

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}
Ok(Message::Ping(_)) => {
trace!(?rpc_url, "received ping message");
}
Ok(Message::Pong(_)) => {
trace!(?rpc_url, "received pong message");
}
Ok(Message::Frame(_)) => {
warn!(?rpc_url, "received unexpected raw frame");
}
Err(e) => {
error!(?e, ?rpc_url, "error reading message from websocket connection");
}
Expand Down