🐞 fix(plugin_manager on session input): fix tcp segment leak when overlimit
This commit is contained in:
@@ -1016,7 +1016,10 @@ void plugin_manager_on_session_input(struct session *sess, struct packet *pkt)
|
|||||||
session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_input_topic_id ,(void *)pkt, STELLAR_MQ_PRIORITY_HIGH);
|
session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_input_topic_id ,(void *)pkt, STELLAR_MQ_PRIORITY_HIGH);
|
||||||
while ((seg = session_get_tcp_segment(sess)) != NULL)
|
while ((seg = session_get_tcp_segment(sess)) != NULL)
|
||||||
{
|
{
|
||||||
session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_stream_topic_id, (void *)seg, STELLAR_MQ_PRIORITY_HIGH);
|
if(session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_stream_topic_id, (void *)seg, STELLAR_MQ_PRIORITY_HIGH)!=0)
|
||||||
|
{
|
||||||
|
session_free_tcp_segment(sess, seg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SESSION_TYPE_UDP:
|
case SESSION_TYPE_UDP:
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ struct registered_session_plugin_schema
|
|||||||
* PLUGIN MANAGER INIT & EXIT *
|
* PLUGIN MANAGER INIT & EXIT *
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
#define MAX_MSG_PER_DISPATCH 128
|
#define MAX_MSG_PER_DISPATCH 256
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user