Be more agressive at trying to reconnect after a failure.
This commit is contained in:
parent
56916cdb0d
commit
6f42e0dad3
1 changed files with 6 additions and 4 deletions
10
DMRIPSC.cpp
10
DMRIPSC.cpp
|
@ -353,6 +353,7 @@ void CDMRIPSC::clock(unsigned int ms)
|
||||||
m_status = DISCONNECTED; // XXX
|
m_status = DISCONNECTED; // XXX
|
||||||
m_timeoutTimer.stop();
|
m_timeoutTimer.stop();
|
||||||
m_retryTimer.stop();
|
m_retryTimer.stop();
|
||||||
|
m_pingTimer.stop();
|
||||||
} else if (::memcmp(m_buffer, "MSTPONG", 7U) == 0) {
|
} else if (::memcmp(m_buffer, "MSTPONG", 7U) == 0) {
|
||||||
m_timeoutTimer.start();
|
m_timeoutTimer.start();
|
||||||
} else if (::memcmp(m_buffer, "RPTSBKN", 7U) == 0) {
|
} else if (::memcmp(m_buffer, "RPTSBKN", 7U) == 0) {
|
||||||
|
@ -391,10 +392,11 @@ void CDMRIPSC::clock(unsigned int ms)
|
||||||
|
|
||||||
m_timeoutTimer.clock(ms);
|
m_timeoutTimer.clock(ms);
|
||||||
if (m_timeoutTimer.isRunning() && m_timeoutTimer.hasExpired()) {
|
if (m_timeoutTimer.isRunning() && m_timeoutTimer.hasExpired()) {
|
||||||
LogError("Connection to the master has timed out");
|
LogError("Connection to the master has timed out, retrying connection");
|
||||||
m_status = DISCONNECTED;
|
m_status = WAITING_LOGIN;
|
||||||
m_timeoutTimer.stop();
|
m_timeoutTimer.start();
|
||||||
m_retryTimer.stop();
|
m_retryTimer.start();
|
||||||
|
m_pingTimer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue