MINOR: stconn: Always report READ/WRITE event on shutr/shutw
It was done by hand by callers when a shutdown for read or write was
performed. It is now always handled by the functions performing the
shutdown. This way the callers don't take care of it. This will avoid some
bugs.
diff --git a/src/hlua.c b/src/hlua.c
index 1771d14..be3c1ac 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2003,7 +2003,6 @@
if (ctx->die) {
sc_shutw(sc);
sc_shutr(sc);
- sc_ic(sc)->flags |= CF_READ_EVENT;
notification_wake(&ctx->wake_on_read);
notification_wake(&ctx->wake_on_write);
stream_shutdown(__sc_strm(sc), SF_ERR_KILLED);
@@ -9426,7 +9425,6 @@
struct hlua_tcp_ctx *tcp_ctx = ctx->svcctx;
struct stconn *sc = appctx_sc(ctx);
struct stream *strm = __sc_strm(sc);
- struct channel *res = sc_ic(sc);
struct act_rule *rule = ctx->rule;
struct proxy *px = strm->be;
struct hlua *hlua = tcp_ctx->hlua;
@@ -9450,7 +9448,6 @@
/* eat the whole request */
co_skip(sc_oc(sc), co_data(sc_oc(sc)));
- res->flags |= CF_READ_EVENT;
sc_shutr(sc);
return;
@@ -9732,10 +9729,8 @@
done:
if (http_ctx->flags & APPLET_DONE) {
- if (!(res->flags & CF_SHUTR)) {
- res->flags |= CF_READ_EVENT;
+ if (!(res->flags & CF_SHUTR))
sc_shutr(sc);
- }
/* eat the whole request */
if (co_data(req)) {