mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01: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() {
|
||||
@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…
Add table
Reference in a new issue