mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 14:26:30 -04:00
if we change the timeouts on bufferevents, we might have to readd pending events
svn:r911
This commit is contained in:
parent
12077b4e2e
commit
5e905c9dd5
@ -531,6 +531,11 @@ bufferevent_settimeout(struct bufferevent *bufev,
|
||||
int timeout_read, int timeout_write) {
|
||||
bufev->timeout_read = timeout_read;
|
||||
bufev->timeout_write = timeout_write;
|
||||
|
||||
if (event_pending(&bufev->ev_read, EV_READ, NULL))
|
||||
bufferevent_add(&bufev->ev_read, timeout_read);
|
||||
if (event_pending(&bufev->ev_write, EV_WRITE, NULL))
|
||||
bufferevent_add(&bufev->ev_write, timeout_write);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user