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
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void restart() {
|
||||
if (keepAliveTimer == null)
|
||||
keepAliveTimer = UserThread.runPeriodically(() -> {
|
||||
stopped = false;
|
||||
keepAlive();
|
||||
}, INTERVAL_SEC);
|
||||
public void start() {
|
||||
restart();
|
||||
}
|
||||
|
||||
|
||||
|
@ -166,6 +162,14 @@ public class KeepAliveManager implements MessageListener, ConnectionListener, Pe
|
|||
// Private
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void restart() {
|
||||
if (keepAliveTimer == null)
|
||||
keepAliveTimer = UserThread.runPeriodically(() -> {
|
||||
stopped = false;
|
||||
keepAlive();
|
||||
}, INTERVAL_SEC);
|
||||
}
|
||||
|
||||
private void keepAlive() {
|
||||
if (!stopped) {
|
||||
Log.traceCall();
|
||||
|
|
Loading…
Add table
Reference in a new issue