mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 04:29:22 +00:00
connectionService.getRefreshPeriodMs() is always positive, add docs
This commit is contained in:
parent
72c5632105
commit
057c629629
2 changed files with 3 additions and 7 deletions
|
@ -251,11 +251,7 @@ public final class CoreMoneroConnectionsService {
|
|||
}
|
||||
|
||||
public long getRefreshPeriodMs() {
|
||||
if (connectionList.getRefreshPeriod() < 0 || connectionList.getRefreshPeriod() > 0) {
|
||||
return connectionList.getRefreshPeriod();
|
||||
} else {
|
||||
return getDefaultRefreshPeriodMs();
|
||||
}
|
||||
return connectionList.getRefreshPeriod() > 0 ? connectionList.getRefreshPeriod() : getDefaultRefreshPeriodMs();
|
||||
}
|
||||
|
||||
public void verifyConnection() {
|
||||
|
@ -526,7 +522,7 @@ public final class CoreMoneroConnectionsService {
|
|||
new Thread(() -> {
|
||||
synchronized (lock) {
|
||||
stopPolling();
|
||||
if (getRefreshPeriodMs() > 0) startPolling();
|
||||
if (connectionList.getRefreshPeriod() >= 0) startPolling(); // 0 means default refresh poll
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class EncryptedConnectionList implements PersistableEnvelope, PersistedDa
|
|||
|
||||
private final Map<String, EncryptedConnection> items = new HashMap<>();
|
||||
private @NonNull String currentConnectionUrl = "";
|
||||
private long refreshPeriod;
|
||||
private long refreshPeriod; // -1 means no refresh, 0 means default, >0 means custom
|
||||
private boolean autoSwitch;
|
||||
|
||||
@Inject
|
||||
|
|
Loading…
Reference in a new issue