mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MINOR: connection: abort earlier when errors are detected
If an uncaught CO_FL_ERROR flag on a connection is detected, we immediately go to the wakeup function. This ensures that even if an error is asynchronously delivered, we don't risk re-enabling polling or doing unexpected things in the handshake handlers.
This commit is contained in:
parent
36fb02c526
commit
9a92cd5985
@ -50,6 +50,10 @@ int conn_fd_handler(int fd)
|
|||||||
* more easily detect an EAGAIN condition from anywhere.
|
* more easily detect an EAGAIN condition from anywhere.
|
||||||
*/
|
*/
|
||||||
flags = conn->flags &= ~(CO_FL_WAIT_DATA|CO_FL_WAIT_ROOM|CO_FL_WAIT_RD|CO_FL_WAIT_WR);
|
flags = conn->flags &= ~(CO_FL_WAIT_DATA|CO_FL_WAIT_ROOM|CO_FL_WAIT_RD|CO_FL_WAIT_WR);
|
||||||
|
flags &= ~CO_FL_ERROR; /* ensure to call the wake handler upon error */
|
||||||
|
|
||||||
|
if (unlikely(conn->flags & CO_FL_ERROR))
|
||||||
|
goto leave;
|
||||||
|
|
||||||
process_handshake:
|
process_handshake:
|
||||||
/* The handshake callbacks are called in sequence. If either of them is
|
/* The handshake callbacks are called in sequence. If either of them is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user