if we change the timeouts on bufferevents, we might have to readd pending events

svn:r911
This commit is contained in:
Niels Provos 2008-07-17 14:09:07 +00:00
parent 12077b4e2e
commit 5e905c9dd5

View File

@ -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);
}
/*