0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 08:39:42 +08:00

Merge pull request #1714 from somdoron/master

problem: condition variable setting invalid timeout
This commit is contained in:
Pieter Hintjens 2016-01-18 14:45:05 +01:00
commit 9ebb5cc911

View File

@ -164,6 +164,12 @@ namespace zmq
timeout.tv_sec += timeout_ / 1000;
timeout.tv_nsec += (timeout_ % 1000) * 1000000;
if (timeout.tv_nsec > 1E9) {
timeout.tv_sec++;
timeout.tv_nsec -= 1E9;
}
rc = pthread_cond_timedwait (&cond, mutex_->get_mutex (), &timeout);
}
else