BUG/MEDIUM: checks/mux: always enable send-polling after connecting
Before introducing the mux layer, tcp_connect() would poll for sending
to detect the connection establishment. It happens that the health
checks have apparently never explicitly enabled this polling and have
been relying on this implicit one.
Now that there's the mux layer, the conn_stream needs to be enabled
for polling as well and since it's not done in the checks, it's never
done and the check's request doesn't leave the machine, as can be
noticed with http checks.
The solution simply consists in going back to the well-known case
where we enable polling after connecting using cs_want_send() if we
have anything but just a plain connect(). The regular data path is
not affected because the stream interface code automatically computes
the polling needs based on buffer contents.
diff --git a/src/checks.c b/src/checks.c
index 0b72bb2..aaee9c9 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1586,6 +1586,10 @@
ret = SF_ERR_INTERNAL;
if (proto && proto->connect)
ret = proto->connect(conn, check->type, quickack ? 2 : 0);
+
+ if (check->type)
+ cs_want_send(cs);
+
#ifdef USE_OPENSSL
if (s->check.sni)
ssl_sock_set_servername(conn, s->check.sni);