Change accept error handling to warn
In a given transport listener thread, instead of terminating the listen
loop on an AcceptError, log the error as warn and continue. These errors
most likely occur due to issues on the remote end, and therefore should
be ignored.
@@ -335,11 +335,8 @@ impl SplinterDaemon {
continue;
}
Err(AcceptError::IoError(err)) => {
- error!("Unable to receive new connections; exiting: {:?}", err);
- return Err(StartError::TransportError(format!(
- "Accept Error: {:?}",
- err
- )));
+ warn!("Failed to accept connection on {}: {}", endpoint, err);
+ continue;
}
};
debug!("Received connection from {}", connection.remote_endpoint());
