mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-19 09:15:34 -04:00
be_sock: unfreeze buffers on fd changing
Only bufferevent_sock have evbuffer_freeze()/evbuffer_unfreeze() & ctrl ops, so we don't need to fix other bufferevents (be_pair doesn't have ctrl op). Found during draining buffers in http layer, and hence 501-not-implemented error in regress http/.. (with some custom hacking).
This commit is contained in:
parent
2185e63921
commit
255525dd74
@ -630,6 +630,9 @@ be_socket_setfd(struct bufferevent *bufev, evutil_socket_t fd)
|
||||
event_del(&bufev->ev_read);
|
||||
event_del(&bufev->ev_write);
|
||||
|
||||
evbuffer_unfreeze(bufev->input, 0);
|
||||
evbuffer_unfreeze(bufev->output, 1);
|
||||
|
||||
event_assign(&bufev->ev_read, bufev->ev_base, fd,
|
||||
EV_READ|EV_PERSIST|EV_FINALIZE, bufferevent_readcb, bufev);
|
||||
event_assign(&bufev->ev_write, bufev->ev_base, fd,
|
||||
|
Loading…
x
Reference in New Issue
Block a user