Skip to content
Open
Changes from all commits
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
10 changes: 8 additions & 2 deletions src/electrum/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,11 @@ impl RPC {
}
})
}
Notification::Exit => acceptor.send(None).unwrap(), // mark acceptor as done
Notification::Exit => {
if acceptor.send(None).is_err() {
warn!("acceptor already shut down before Exit notification");
}
}
}
}
});
Expand All @@ -789,7 +793,9 @@ impl RPC {
stream
.set_nonblocking(false)
.expect("failed to set connection as blocking");
acceptor.send(Some((stream, addr))).expect("send failed");
if acceptor.send(Some((stream, addr))).is_err() {
break; // receiver dropped, server is shutting down
}
}
});
chan
Expand Down
Loading