diff options
| author | luwenpeng <[email protected]> | 2019-09-24 16:39:16 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2019-09-24 16:39:16 +0800 |
| commit | 5e319a1f79fa564cd5cd299f4d07f9d023825208 (patch) | |
| tree | d38b9da18a7d82edce60c338dac1a4fa2dbfd5b4 /plugin/protocol/http2/src/http2_stream.cpp | |
| parent | afa3bed4aee5da4d246c097f3503d6ab009736be (diff) | |
# 修改 http2 googletest
* 原来仅更新了 http2 代码,未更新测试用例,造成测试用例执行时会 coredump。
Diffstat (limited to 'plugin/protocol/http2/src/http2_stream.cpp')
| -rw-r--r-- | plugin/protocol/http2/src/http2_stream.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugin/protocol/http2/src/http2_stream.cpp b/plugin/protocol/http2/src/http2_stream.cpp index 29f8c69..4ff47e6 100644 --- a/plugin/protocol/http2/src/http2_stream.cpp +++ b/plugin/protocol/http2/src/http2_stream.cpp @@ -1629,7 +1629,11 @@ nghttp2_server_submit_header(struct tfe_h2_stream *h2_stream_info, int32_t strea stream_action = ACTION_DEFER_DATA; goto finish; } - nghttp2_write_log(h2_session,h2_stream_info->tf_stream->str_stream_info, CONN_DIR_UPSTREAM); + + // int googletest, h2_stream_info->tf_stream is NULL + if (h2_session && h2_stream_info && h2_stream_info->tf_stream) { + nghttp2_write_log(h2_session, h2_stream_info->tf_stream->str_stream_info, CONN_DIR_UPSTREAM); + } stream_action = nghttp2_server_frame_submit_header(h2_stream_info, h2_session); if (stream_action == ACTION_DROP_DATA){ @@ -1799,7 +1803,10 @@ nghttp2_client_submit_header(struct tfe_h2_stream *h2_stream_info, int32_t strea req->event_cb(req, EV_HTTP_REQ_HDR, NULL, 0, req->event_cb_user); - nghttp2_write_log(h2_session, h2_stream_info->tf_stream->str_stream_info, CONN_DIR_DOWNSTREAM); + // int googletest, h2_stream_info->tf_stream is NULL + if (h2_session && h2_stream_info && h2_stream_info->tf_stream) { + nghttp2_write_log(h2_session, h2_stream_info->tf_stream->str_stream_info, CONN_DIR_DOWNSTREAM); + } stream_action = nghttp2_client_frame_submit_header(h2_stream_info, h2_session); if (stream_action == ACTION_DROP_DATA){ xret = nghttp2_session_send(h2_stream_info->as_client); |
