mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-14 06:32:11 -04:00
MINOR: stconn: Simplify sc_abort/sc_shutdown by merging calls to se_shutdown
Calls to se_shutdown were no the same between applets and mux endpoints. Only the SHUTW flag was not the same. However, on the multiplexers are sensitive to the true SHUTW flag. The applets handle all of them the same way. So calls to se_shutdown() from sc_abort() and sc_shutdown() can be merged to always use the multiplexer version.
This commit is contained in:
parent
fb1bc592f5
commit
b2b0d1a8be
1 changed files with 2 additions and 6 deletions
|
|
@ -581,10 +581,8 @@ void sc_abort(struct stconn *sc)
|
|||
return;
|
||||
|
||||
if (sc->flags & SC_FL_SHUT_DONE) {
|
||||
if (sc_ep_test(sc, SE_FL_T_MUX))
|
||||
if (sc_ep_test(sc, SE_FL_T_MUX|SE_FL_T_APPLET))
|
||||
se_shutdown(sc->sedesc, SE_SHR_RESET|SE_SHW_SILENT);
|
||||
else if (sc_ep_test(sc, SE_FL_T_APPLET))
|
||||
se_shutdown(sc->sedesc, SE_SHR_RESET|SE_SHW_NORMAL);
|
||||
|
||||
sc->state = SC_ST_DIS;
|
||||
if (sc->flags & SC_FL_ISBACK)
|
||||
|
|
@ -639,10 +637,8 @@ void sc_shutdown(struct stconn *sc)
|
|||
return;
|
||||
}
|
||||
|
||||
if (sc_ep_test(sc, SE_FL_T_MUX))
|
||||
if (sc_ep_test(sc, SE_FL_T_MUX|SE_FL_T_APPLET))
|
||||
se_shutdown(sc->sedesc, SE_SHR_RESET|((sc->flags & SC_FL_NOLINGER) ? SE_SHW_SILENT : SE_SHW_NORMAL));
|
||||
else if (sc_ep_test(sc, SE_FL_T_APPLET))
|
||||
se_shutdown(sc->sedesc, SE_SHR_RESET|SE_SHW_NORMAL);
|
||||
|
||||
sc->state = SC_ST_DIS;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue