mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-11 17:55:53 +00:00
Peer: invoke disconnection handlers on timeout even if we didn't successfully connect yet.
This commit is contained in:
parent
2138c8aec4
commit
a698c5846e
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user