-
Notifications
You must be signed in to change notification settings - Fork 173
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
ws server: respect max limit for received messages #537
Conversation
…om:paritytech/jsonrpsee into na-ws-dont-terminate-conn-exceed-max-limit
Ok, I'm convinced to keep the logs as errors but the logs are already sufficiently granular.. For example:
|
Fair. By matching more granularly we might be able to remove some of them that aren't relevant errors to the user, but I don't think there are any really? |
I agree, there are none except maybe some I/O error's because the connection was already closed by the peer. |
Blocked on paritytech/soketto#53 |
let subscriber = tracing_subscriber::FmtSubscriber::builder().finish(); | ||
tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed"); | ||
tracing_subscriber::FmtSubscriber::builder() | ||
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) |
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.
use RUST_LOG env
variable
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.
A few nits. Still LGTM.
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
…e-conn-exceed-max-limit
…-max-limit' into na-ws-dont-terminate-conn-exceed-max-limit
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.
Nice!
// TODO: check length of response https://github.com/paritytech/jsonrpsee/issues/536 | ||
tracing::debug!("send {} bytes", response.len()); | ||
tracing::trace!("send: {}", response); | ||
let _ = sender.send_text_owned(response).await; |
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.
👍 for skipping a clone :)
This PR changes such that we use the
max limit
for the received messages insoketto (WS)
to deny too large message and not allocate a huge buffer that we did before.