-
Notifications
You must be signed in to change notification settings - Fork 274
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
ignore dropped connections #502
Conversation
PR description please? |
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.
lgtm but a test would be nice.
tcp/src/server.rs
Outdated
let peer_addr = match socket.peer_addr() { | ||
Ok(addr) => addr, | ||
Err(e) => { | ||
trace!(target: "tcp", "Unable to determine socket peer address, ignoring connection {}", e); |
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.
trace!(target: "tcp", "Unable to determine socket peer address, ignoring connection {}", e); | |
warn!(target: "tcp", "Unable to determine socket peer address, ignoring connection {}", e); |
@seunlanlege after this gets merged please update the version number and release a new version on |
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.
lgtm, just address David's grumble.
Previously If there's no
peer_addr
on the socket, this causes the tcp-server to panic.jsonrpc/tcp/src/server.rs
Lines 87 to 93 in 4418476
Instead of panicking this PR instead ignores the connection as it has most likely been dropped by the client.
closes #500