| |
reactor::Error::ListenerPollError(id, _) => {
|
| |
// TODO: This should be a fatal error, there's nothing we can do here.
|
| |
log::error!(target: "wire", "Received error: listener {} disconnected", id);
|
| - |
self.actions.push_back(Action::UnregisterListener(*id));
|
| + |
self.actions.push_back(Action::UnregisterListener(id));
|
| |
}
|
| |
reactor::Error::ListenerDisconnect(id, _, _) => {
|
| |
// TODO: This should be a fatal error, there's nothing we can do here.
|
| |
log::error!(target: "wire", "Received error: peer (fd={fd}) poll error");
|
| |
|
| |
self.disconnect(
|
| - |
*fd,
|
| + |
fd,
|
| |
DisconnectReason::Connection(Arc::new(io::Error::from(io::ErrorKind::Other))),
|
| |
)
|
| |
}
|
| - |
reactor::Error::TransportDisconnect(fd, _, _) => {
|
| + |
reactor::Error::TransportDisconnect(fd, session, _) => {
|
| |
log::error!(target: "wire", "Received error: peer (fd={fd}) disconnected");
|
| |
|
| + |
// We're dropping the TCP connection here.
|
| + |
drop(session);
|
| + |
|
| |
// The peer transport is already disconnected and removed from the reactor;
|
| |
// therefore there is no need to initiate a disconnection. We simply remove
|
| |
// the peer from the map.
|
| - |
match self.peers.remove(fd) {
|
| + |
match self.peers.remove(&fd) {
|
| |
Some(peer) => {
|
| |
let reason = DisconnectReason::Connection(Arc::new(io::Error::from(
|
| |
io::ErrorKind::ConnectionReset,
|