修正Replace的Detach方法,原实现在detach该session后,触发END时间时导致段错误

This commit is contained in:
Lu Qiuwen
2018-10-23 14:37:21 +08:00
parent e44159a5dc
commit 0c3d216cf3

View File

@@ -585,6 +585,7 @@ void http_replace(const struct tfe_stream * stream, const struct tfe_http_sessio
if (to_write_sess == NULL) //fail to wirte, abandon.
{
TFE_STREAM_LOG_INFO(stream, "tfe_http_session_allow_write() %s failed.", session->req->req_spec.uri);
ctx->action = PG_ACTION_NONE;
tfe_http_session_detach(session); return;
}
@@ -602,6 +603,7 @@ void http_replace(const struct tfe_stream * stream, const struct tfe_http_sessio
else
{
TFE_STREAM_LOG_INFO(stream, "Can only setup replace on REQ/RESP headers, detached.");
ctx->action = PG_ACTION_NONE;
tfe_http_session_detach(session); return;
}
}