mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Break out of main peer loop on error
This commit is contained in:
parent
5915580ab3
commit
684e8164f5
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,7 @@ impl Server {
|
|||
let sc = stream.try_clone();
|
||||
if let Err(e) = self.handle_new_peer(stream) {
|
||||
warn!("Error accepting peer {}: {:?}", peer_addr.to_string(), e);
|
||||
break;
|
||||
} else {
|
||||
if let Ok(s) = sc {
|
||||
connected_sockets.insert(peer_addr, s);
|
||||
|
@ -101,6 +102,7 @@ impl Server {
|
|||
}
|
||||
Err(e) => {
|
||||
warn!("Couldn't establish new client connection: {:?}", e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if self.stop_state.lock().is_stopped() {
|
||||
|
|
Loading…
Reference in a new issue