diff --git a/src/stconn.c b/src/stconn.c index f3b030fd6..1f2294fa2 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -694,7 +694,8 @@ static void sc_app_shut(struct stconn *sc) } sc->flags &= ~SC_FL_NOLINGER; - sc->flags |= SC_FL_ABRT_DONE; + if (!(sc->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) + sc->flags |= SC_FL_ABRT_DONE; if (sc->flags & SC_FL_ISBACK) __sc_strm(sc)->conn_exp = TICK_ETERNITY; @@ -830,7 +831,8 @@ static void sc_app_shut_conn(struct stconn *sc) } sc->flags &= ~SC_FL_NOLINGER; - sc->flags |= SC_FL_ABRT_DONE; + if (!(sc->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) + sc->flags |= SC_FL_ABRT_DONE; if (sc->flags & SC_FL_ISBACK) __sc_strm(sc)->conn_exp = TICK_ETERNITY; } @@ -1014,7 +1016,8 @@ static void sc_app_shut_applet(struct stconn *sc) } sc->flags &= ~SC_FL_NOLINGER; - sc->flags |= SC_FL_ABRT_DONE; + if (!(sc->flags & (SC_FL_EOS|SC_FL_ABRT_DONE))) + sc->flags |= SC_FL_ABRT_DONE; if (sc->flags & SC_FL_ISBACK) __sc_strm(sc)->conn_exp = TICK_ETERNITY; }