mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-29 17:17:19 -04:00
Add null check
This commit is contained in:
parent
3c6f31a421
commit
aff235dbb0
1 changed files with 12 additions and 6 deletions
|
@ -323,14 +323,20 @@ public class TomP2PNode implements ClientNode {
|
||||||
timer.scheduleAtFixedRate(new TimerTask() {
|
timer.scheduleAtFixedRate(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (peerDHT != null && !storedPeerAddress.equals(peerDHT.peerAddress())) {
|
if (storedPeerAddress != null) {
|
||||||
try {
|
if (peerDHT != null && !storedPeerAddress.equals(peerDHT.peerAddress())) {
|
||||||
storeAddress();
|
try {
|
||||||
} catch (IOException e) {
|
storeAddress();
|
||||||
e.printStackTrace();
|
} catch (IOException e) {
|
||||||
log.error(e.toString());
|
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);
|
}, checkIfIPChangedPeriod, checkIfIPChangedPeriod);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue