mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add start method, make restart private
This commit is contained in:
parent
be14e8495c
commit
4d39364772
1 changed files with 10 additions and 6 deletions
|
@ -60,12 +60,8 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
|
||||||
// API
|
// API
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public void restart() {
|
public void start() {
|
||||||
if (keepAliveTimer == null)
|
restart();
|
||||||
keepAliveTimer = UserThread.runPeriodically(() -> {
|
|
||||||
stopped = false;
|
|
||||||
keepAlive();
|
|
||||||
}, INTERVAL_SEC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,6 +162,14 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
|
||||||
// Private
|
// Private
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
private void restart() {
|
||||||
|
if (keepAliveTimer == null)
|
||||||
|
keepAliveTimer = UserThread.runPeriodically(() -> {
|
||||||
|
stopped = false;
|
||||||
|
keepAlive();
|
||||||
|
}, INTERVAL_SEC);
|
||||||
|
}
|
||||||
|
|
||||||
private void keepAlive() {
|
private void keepAlive() {
|
||||||
if (!stopped) {
|
if (!stopped) {
|
||||||
Log.traceCall();
|
Log.traceCall();
|
||||||
|
|
Loading…
Add table
Reference in a new issue