mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
regress_ssl: fix ssl/bufferevent_wm_filter for non defered callbacks
Even after referenced patch there is still possible recursive callbacks from evbuffer_drain(bev_input), i.e.: wm_transfer() -> evbuffer_drain() -> wm_transfer() inc(ctx->get) But if we will increment ctx->get before drain that we will not add more data to buffer. Refs: 54c6fe3c ("regress_ssl: make ssl/bufferevent_wm_filter more fault-tolerance") CI: https://ci.appveyor.com/project/nmathewson/libevent/build/job/f0rv299i71wnuxdq#L2546
This commit is contained in:
parent
9afe7a6c12
commit
1fc1c7ef1d
@ -822,8 +822,8 @@ wm_transfer(struct bufferevent *bev, void *arg)
|
||||
bufferevent_setcb(bev, NULL, NULL, NULL, NULL);
|
||||
bufferevent_disable(bev, EV_READ);
|
||||
} else {
|
||||
evbuffer_drain(in, drain);
|
||||
ctx->get += drain;
|
||||
evbuffer_drain(in, drain);
|
||||
}
|
||||
|
||||
TT_BLATHER(("wm_transfer-%s(%p): "
|
||||
|
Loading…
x
Reference in New Issue
Block a user