mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-10-22 16:22:49 +00:00
Don't inform the API user of peer disconnects or select a new download peer when a PeerGroup is being terminated. Fixes issue 95.
This commit is contained in:
@@ -323,8 +323,13 @@ public class PeerGroup {
|
|||||||
log.error("Unexpected exception whilst talking to " + peer, ex);
|
log.error("Unexpected exception whilst talking to " + peer, ex);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// In all cases, disconnect and put the address back on the queue.
|
// We may be terminating because of a controlled shutdown. If so, don't inform the user of individual
|
||||||
// We will retry this peer after all other peers have been tried.
|
// peer connections or select a new download peer.
|
||||||
|
if (!running)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Disconnect and put the address back on the queue. We will retry this peer after all
|
||||||
|
// other peers have been tried.
|
||||||
peer.disconnect();
|
peer.disconnect();
|
||||||
|
|
||||||
// We may not know the address if the peer was added directly.
|
// We may not know the address if the peer was added directly.
|
||||||
|
Reference in New Issue
Block a user