mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: h3: use INTERNAL_ERROR code for init failure
Consider that application layer is responsible to set proper error code on init or finalize operation failure. In case of H3, use INTERNAL_ERROR application error code. This allows to remove qcc_set_error() invocation from qmux_init(). In case application layer would not specify any error code, fallback INTERNAL_ERROR transport error code would be used thanks to the recent change introduced for error management in qmux_init().
This commit is contained in:
parent
7a3602a1f5
commit
9ab107b84b
2
src/h3.c
2
src/h3.c
@ -2216,6 +2216,7 @@ static int h3_init(struct qcc *qcc)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
fail_no_h3:
|
fail_no_h3:
|
||||||
|
qcc_set_error(qcc, H3_INTERNAL_ERROR, 1);
|
||||||
TRACE_DEVEL("leaving on error", H3_EV_H3C_NEW, qcc->conn);
|
TRACE_DEVEL("leaving on error", H3_EV_H3C_NEW, qcc->conn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2247,6 +2248,7 @@ static int h3_finalize(void *ctx)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
qcc_set_error(qcc, H3_INTERNAL_ERROR, 1);
|
||||||
TRACE_DEVEL("leaving on error", H3_EV_H3C_NEW, qcc->conn);
|
TRACE_DEVEL("leaving on error", H3_EV_H3C_NEW, qcc->conn);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2635,8 +2635,6 @@ static int qmux_init(struct connection *conn, struct proxy *prx,
|
|||||||
|
|
||||||
if (qcc_install_app_ops(qcc, conn->handle.qc->app_ops)) {
|
if (qcc_install_app_ops(qcc, conn->handle.qc->app_ops)) {
|
||||||
TRACE_PROTO("Cannot install app layer", QMUX_EV_QCC_NEW|QMUX_EV_QCC_ERR, conn);
|
TRACE_PROTO("Cannot install app layer", QMUX_EV_QCC_NEW|QMUX_EV_QCC_ERR, conn);
|
||||||
/* prepare a CONNECTION_CLOSE frame */
|
|
||||||
qcc_set_error(qcc, QC_ERR_APPLICATION_ERROR, 0);
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user