Commit 9ebb5cc9 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1714 from somdoron/master

problem: condition variable setting invalid timeout
parents d906e815 4bfe2ec6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment