修正当HTTP Session被Kill时没有调用HTTP Session End、Stream Close接口的问题。
This commit is contained in:
@@ -687,6 +687,9 @@ static void __stream_bev_readcb(struct bufferevent * bev, void * arg)
|
||||
|
||||
/* Destroy STREAM */
|
||||
TFE_PROXY_STAT_INCREASE(STAT_STREAM_CLS_KILL, 1);
|
||||
|
||||
/* Call plugin close when the connection is killed */
|
||||
call_plugin_close(_stream);
|
||||
return tfe_stream_destory(_stream);
|
||||
}
|
||||
|
||||
|
||||
@@ -440,8 +440,13 @@ enum tfe_stream_action http_connection_entry(const struct tfe_stream * stream, e
|
||||
|
||||
if(hs_private->kill_signal)
|
||||
{
|
||||
/* Kill the TCP stream */
|
||||
tfe_stream_kill(stream);
|
||||
return ACTION_DROP_DATA;
|
||||
|
||||
/* Close the session */
|
||||
__need_to_close_the_session = true;
|
||||
__action = ACTION_DROP_DATA;
|
||||
goto __close_the_session;
|
||||
}
|
||||
|
||||
if (hf_private_in->is_upgrade || hf_private_in->is_passthrough)
|
||||
@@ -504,6 +509,7 @@ enum tfe_stream_action http_connection_entry(const struct tfe_stream * stream, e
|
||||
__need_to_close_the_session = true;
|
||||
}
|
||||
|
||||
__close_the_session:
|
||||
/* There is nothing for this session, close the session */
|
||||
if (__need_to_close_the_session)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user