From: Willy Tarreau Date: Sat, 18 Mar 2017 14:39:57 +0000 (+0100) Subject: MEDIUM: connection: don't test for CO_FL_WAKE_DATA X-Git-Tag: v1.8-dev1~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9fa1ee61cc6a7aef2d7cd7bba41869f682921dcb;p=thirdparty%2Fhaproxy.git MEDIUM: connection: don't test for CO_FL_WAKE_DATA This flag is always set when we end up here, for each and every data layer (idle, stream-interface, checks), and continuing to test it leaves a big risk of forgetting to set it as happened once already before 1.5-dev13. It could make sense to backport this into stable branches as part of the connection flag fixes, after some cool down period. --- diff --git a/src/connection.c b/src/connection.c index ba9b67545b..c23f464d3b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -152,8 +152,7 @@ void conn_fd_handler(int fd) * Note that the wake callback is allowed to release the connection and * the fd (and return < 0 in this case). */ - if ((conn->flags & CO_FL_WAKE_DATA) && - (((conn->flags ^ flags) & CO_FL_NOTIFY_DATA) || + if ((((conn->flags ^ flags) & CO_FL_NOTIFY_DATA) || ((flags & (CO_FL_CONNECTED|CO_FL_HANDSHAKE)) != CO_FL_CONNECTED && (conn->flags & (CO_FL_CONNECTED|CO_FL_HANDSHAKE)) == CO_FL_CONNECTED)) && conn->data->wake(conn) < 0)