fix(peer): log disconnect cause; bind e2e browse listener on all interfaces
The brokered third-party browse e2e failed deterministically on CI. The test bound its listener to 127.0.0.1 only, but the server brokers back the address it observed for that client - the host's routable IP (172.17.0.2 under Docker, 10.x on a CI runner). The sharer's dial was refused, it fell back to re-brokering, and the accept never arrived. The sibling third-party browse tests already bind 0.0.0.0. disconnect_with_error logged only "disconnect" and dropped the io::Error on the floor, which is what made this invisible in the logs; it now logs the cause.
This commit is contained in:
@@ -609,7 +609,10 @@ impl PeerActor {
|
||||
|
||||
fn disconnect_with_error(&mut self, error: Error) {
|
||||
let username = self.peer_username();
|
||||
debug!("[peer:{}] disconnect", username);
|
||||
// Include the cause: a failed outbound dial reports nothing else, so
|
||||
// without it an unreachable peer is indistinguishable from a clean
|
||||
// disconnect in the logs.
|
||||
debug!("[peer:{}] disconnect: {}", username, error);
|
||||
|
||||
self.stream.take();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user