mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 15:26:03 -04:00
Add null check
This commit is contained in:
parent
3c6f31a421
commit
aff235dbb0
@ -323,14 +323,20 @@ public class TomP2PNode implements ClientNode {
|
||||
timer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (peerDHT != null && !storedPeerAddress.equals(peerDHT.peerAddress())) {
|
||||
try {
|
||||
storeAddress();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.toString());
|
||||
if (storedPeerAddress != null) {
|
||||
if (peerDHT != null && !storedPeerAddress.equals(peerDHT.peerAddress())) {
|
||||
try {
|
||||
storeAddress();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
log.error("storedPeerAddress is null. That should not happen. " +
|
||||
"Seems there is a problem with DHT storage.");
|
||||
}
|
||||
}
|
||||
}, checkIfIPChangedPeriod, checkIfIPChangedPeriod);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user