Stefan Schuermans commited on 2017-10-28 22:52:00
Showing 1 changed files, with 6 additions and 1 deletions.
| ... | ... |
@@ -117,7 +117,12 @@ void CallMgr::run() |
| 117 | 117 |
while (!m_times.empty() || !m_iosRead.empty() || !m_iosWrite.empty()) {
|
| 118 | 118 |
|
| 119 | 119 |
// get time until first call time |
| 120 |
- Time timeout = m_times.begin()->first - Time::now(); |
|
| 120 |
+ Time timeout; |
|
| 121 |
+ if (!m_times.empty()) {
|
|
| 122 |
+ timeout = m_times.begin()->first - Time::now(); |
|
| 123 |
+ } else {
|
|
| 124 |
+ timeout.fromMs(100); |
|
| 125 |
+ } |
|
| 121 | 126 |
|
| 122 | 127 |
// time already passed or reached |
| 123 | 128 |
if (timeout <= Time::zero) {
|
| 124 | 129 |