mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[select] Do not kill timer in case of (curl,select) combination
This commit is contained in:
parent
5a6f56f1d3
commit
9c9a11d73d
@ -108,7 +108,6 @@ typedef struct _SockInfo
|
|||||||
|
|
||||||
GlobalInfo g;
|
GlobalInfo g;
|
||||||
|
|
||||||
|
|
||||||
#define mycase(code) \
|
#define mycase(code) \
|
||||||
case code: s = __STRING(code)
|
case code: s = __STRING(code)
|
||||||
|
|
||||||
@ -544,15 +543,13 @@ multi_timer_cb_select(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
|||||||
//fprintf(stderr, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
|
//fprintf(stderr, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if timeout_ms is -1, just delete the timer
|
* if timeout_ms is -1, just let the timer to expire.
|
||||||
*
|
*
|
||||||
* For all other values of timeout_ms, this should set or *update* the timer
|
* For all other values of timeout_ms, this should set or *update* the timer
|
||||||
* to the new value
|
* to the new value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (timeout_ms == -1) {
|
if (timeout_ms != -1) {
|
||||||
kill_timer(&g->tim);
|
|
||||||
} else { /* includes timeout zero */
|
|
||||||
install_timer(&g->tim, timeout_ms, timer_cb_select, g);
|
install_timer(&g->tim, timeout_ms, timer_cb_select, g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user