mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-30 19:41:24 +00:00
Peer: invoke disconnection handlers on timeout even if we didn't successfully connect yet.
This commit is contained in:
@@ -276,6 +276,14 @@ public class Peer extends PeerSocketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void timeoutOccurred() {
|
||||
super.timeoutOccurred();
|
||||
if (!connectionOpenFuture.isDone()) {
|
||||
connectionClosed(); // Invoke the event handlers to tell listeners e.g. PeerGroup that we never managed to connect.
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectionClosed() {
|
||||
for (final PeerListenerRegistration registration : eventListeners) {
|
||||
|
Reference in New Issue
Block a user