summaryrefslogtreecommitdiff
path: root/plugin/protocol/http
diff options
context:
space:
mode:
authorLu Qiuwen <[email protected]>2018-11-07 14:14:03 +0800
committerLu Qiuwen <[email protected]>2018-11-07 14:14:03 +0800
commit571f7cd12e5e7d1816e8b4ce90a9d8a54c5296cf (patch)
treeb9d20a65bfeddc21b62f278536d6b0a484f77a02 /plugin/protocol/http
parent2d02343b505e721818bfb75763961c8d65eee174 (diff)
Close #72 修正在HTTP-REQ/RESP-BEGIN事件执行detach动作时段错误。
Diffstat (limited to 'plugin/protocol/http')
-rw-r--r--plugin/protocol/http/src/http_entry.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugin/protocol/http/src/http_entry.cpp b/plugin/protocol/http/src/http_entry.cpp
index a97e3cc..6259458 100644
--- a/plugin/protocol/http/src/http_entry.cpp
+++ b/plugin/protocol/http/src/http_entry.cpp
@@ -298,13 +298,10 @@ static int __on_request_prepare_context(const struct tfe_stream * stream, unsign
hf_private_set_callback(hf_private_req_in, __user_event_dispatch, __closure, free);
/* Call business plugin */
- hs_private->ht_frame = http_frame_raise_session_begin(stream, &hs_private->hs_public, thread_id);
- if (hs_private->ht_frame == NULL)
- {
- TFE_STREAM_LOG_ERROR(stream, "Failed at raising session begin event. ");
- return -1;
- }
+ hs_private->ht_frame = http_frame_alloc();
+ assert(hs_private->ht_frame != NULL);
+ http_frame_raise_session_begin(hs_private->ht_frame, stream, &hs_private->hs_public, thread_id);
TAILQ_INSERT_TAIL(&hc_private->hs_private_list, hs_private, next);
}