mirror of
https://github.com/Qortal/qortal.git
synced 2025-04-23 19:37:51 +00:00
fix pingRemote
This commit is contained in:
parent
706dc03b3e
commit
1d9347ed23
@ -230,6 +230,8 @@ public class RNSPeer {
|
||||
/** Utility methods */
|
||||
public void pingRemote() {
|
||||
var link = this.peerLink;
|
||||
if (nonNull(link)) {
|
||||
if (peerLink.getStatus() == ACTIVE) {
|
||||
log.info("pinging remote: {}", link);
|
||||
var data = "ping".getBytes(UTF_8);
|
||||
link.setPacketCallback(this::linkPacketReceived);
|
||||
@ -238,6 +240,11 @@ public class RNSPeer {
|
||||
//packetReceipt.setTimeout(3L);
|
||||
packetReceipt.setTimeoutCallback(this::packetTimedOut);
|
||||
packetReceipt.setDeliveryCallback(this::packetDelivered);
|
||||
} else {
|
||||
log.info("can't send ping to a peer {} with (link) status: {}",
|
||||
Hex.encodeHexString(peerLink.getDestination().getHash()), peerLink.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//public void shutdownLink(Link link) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user