BlinkenArea commited on 2011-12-28 00:15:14
Showing 1 changed files, with 4 additions and 3 deletions.
... | ... |
@@ -257,8 +257,9 @@ void Phone<ADDR, SOCK>::sendRegister() |
257 | 257 |
sendNow(0, strm.str()); |
258 | 258 |
|
259 | 259 |
// set time for next register message and next heartbeat |
260 |
- m_timeRegister = Time::now() + m_serverTimeout; |
|
261 |
- m_timeHeartbeat = m_timeRegister + m_heartbeatInterval; |
|
260 |
+ Time now = Time::now(); |
|
261 |
+ m_timeRegister = now + m_serverTimeout; |
|
262 |
+ m_timeHeartbeat = now + m_heartbeatInterval; |
|
262 | 263 |
updateTimeCallback(); |
263 | 264 |
} |
264 | 265 |
|
... | ... |
@@ -561,7 +562,7 @@ void Phone<ADDR, SOCK>::updateTimeCallback() |
561 | 562 |
} |
562 | 563 |
|
563 | 564 |
template<typename ADDR, typename SOCK> |
564 |
-const Time Phone<ADDR, SOCK>::m_serverTimeout(5); |
|
565 |
+const Time Phone<ADDR, SOCK>::m_serverTimeout(60); |
|
565 | 566 |
|
566 | 567 |
template<typename ADDR, typename SOCK> |
567 | 568 |
const Time Phone<ADDR, SOCK>::m_heartbeatInterval(20); |
568 | 569 |