asiohiper.cpp / evhiperfifo.c: deal with negative timerfunction input

That means delete the timer.

Reported-by: Michael Kaufmann
Ref: #1253
This commit is contained in:
Daniel Stenberg 2017-05-19 14:16:37 +02:00
parent ce73a30168
commit d6bb1f1d56
2 changed files with 3 additions and 3 deletions

View file

@ -90,7 +90,7 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
timer.async_wait(boost::bind(&timer_cb, _1, g));
}
else {
else if(timeout_ms == 0) {
/* call timeout function immediately */
boost::system::error_code error; /*success*/
timer_cb(error, g);