CLEANUP: connection: use conn_ctrl_ready() instead of checking the flag
It's easier and safer to rely on conn_ctrl_ready() everywhere than to
check the flag itself. It will also simplify adding extra checks later
if needed. Some useless controls for !ctrl have been removed, as the
CTRL_READY flag itself guarantees ctrl is set.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 79c7baf..cd05678 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -626,7 +626,7 @@
if (conn->flags & CO_FL_ERROR)
return 0;
- if (!(conn->flags & CO_FL_CTRL_READY))
+ if (!conn_ctrl_ready(conn))
return 0;
if (!(conn->flags & CO_FL_WAIT_L4_CONN))