mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-02 03:23:12 +00:00
CLEANUP: connection: open-code conn_cond_update_polling() and update the comment
This last call to conn_cond_update_polling() is now totally misleading as the function only stops polling in case of unrecoverable connection error. Let's open-code the test to make it more prominent and explain what we're trying to do there. It's even almost certain this code is never executed anymore, as the only remaining case should be a mux's wake function setting CO_FL_ERROR without disabling the polling, but they need to be audited first to make sure this is the case.
This commit is contained in:
parent
f7e4a6fc07
commit
8b250ba738
@ -177,9 +177,16 @@ void conn_fd_handler(int fd)
|
||||
conn->mux && conn->mux->wake && conn->mux->wake(conn) < 0)
|
||||
return;
|
||||
|
||||
/* commit polling changes */
|
||||
conn_cond_update_polling(conn);
|
||||
return;
|
||||
/* commit polling changes in case of error.
|
||||
* WT: it seems that the last case where this could still be relevant
|
||||
* is if a mux wake function above report a connection error but does
|
||||
* not stop polling. Shouldn't we enforce this into the mux instead of
|
||||
* having to deal with this ?
|
||||
*/
|
||||
if (unlikely(conn->flags & CO_FL_ERROR)) {
|
||||
if (conn_ctrl_ready(conn))
|
||||
fd_stop_both(fd);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the callback which is set when a connection establishment is pending
|
||||
|
Loading…
Reference in New Issue
Block a user