Changed some logging.
This commit is contained in:
+7
-3
@@ -147,7 +147,11 @@ impl Network {
|
|||||||
peers_timer = Instant::now();
|
peers_timer = Instant::now();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info!("Network loop finished");
|
if !running.load(Ordering::SeqCst) {
|
||||||
|
info!("Network loop finished");
|
||||||
|
} else {
|
||||||
|
panic!("Network loop has broken prematurely!");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -182,9 +186,9 @@ fn handle_connection_event(context: Arc<Mutex<Context>>, peers: &mut Peers, regi
|
|||||||
}
|
}
|
||||||
Some(peer) => {
|
Some(peer) => {
|
||||||
if event.is_read_closed() {
|
if event.is_read_closed() {
|
||||||
debug!("Spurious wakeup for connection {}, ignoring", token.0);
|
//debug!("Spurious wakeup for connection {}, ignoring", token.0);
|
||||||
if peer.spurious() >= 3 {
|
if peer.spurious() >= 3 {
|
||||||
debug!("Disconnecting socket on 3 spurious wakeups");
|
//debug!("Disconnecting socket on 3 spurious wakeups");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let interest = if let State::Message{..} = peer.get_state() {
|
let interest = if let State::Message{..} = peer.get_state() {
|
||||||
|
|||||||
Reference in New Issue
Block a user