summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author杨威 <[email protected]>2023-01-17 16:22:24 +0800
committer杨威 <[email protected]>2023-01-17 16:22:24 +0800
commit75d03f9543b476eac329313a802ec4f63185df0b (patch)
tree3d5ad3332ae801c0ec64b8ee19d0ebff9f9e0f01
parenta7432658be53c1bdb461e834af1e2e3b5bcf44ff (diff)
✨ feat(stream_manager): 移除对设置特殊超时流数量的限制
-rw-r--r--src/dealpkt/stream_manage.c14
-rw-r--r--src/timer/sapp_timer.c2
2 files changed, 1 insertions, 15 deletions
diff --git a/src/dealpkt/stream_manage.c b/src/dealpkt/stream_manage.c
index 775e9e3..2506e5b 100644
--- a/src/dealpkt/stream_manage.c
+++ b/src/dealpkt/stream_manage.c
@@ -241,13 +241,6 @@ int stream_set_single_stream_timeout(const struct streaminfo *pstream,unsigned s
if(timeout < udp_reset_time){ /* �����ȫ��Ĭ��ֵ��, �Ҳ��ܱ�֮ǰ���õ�С */
return -1;
}
- if(special_udp_timeout_ratio <= 0)
- {
- return -2;
- }
- if(sapp_global_mthread[pstream->threadnum].udp_stream_special_timeout_num >= udpstate_num[UDP_TWO_STATE]/(100/special_udp_timeout_ratio)){
- return -2;
- }
if(pstream_pr->timeout == udp_reset_time){
/* �������������ó�ʱʱ��, ��ǰ����һ�����ó�ʱʱ���¼���� */
sapp_global_mthread[pstream->threadnum].udp_stream_special_timeout_num++;
@@ -258,13 +251,6 @@ int stream_set_single_stream_timeout(const struct streaminfo *pstream,unsigned s
if(timeout < link_default_nopkt_time){ /* �����ȫ��Ĭ��ֵ��, �Ҳ��ܱ�֮ǰ���õ�С */
return -1;
}
- if(special_tcp_timeout_ratio <= 0)
- {
- return -2;
- }
- if(sapp_global_mthread[pstream->threadnum].tcp_stream_special_timeout_num >= tcpstate_num[TCP_DATA_STATE]/(100/special_tcp_timeout_ratio)){
- return -2;
- }
if(pstream_pr->timeout == link_default_nopkt_time){
/* �������������ó�ʱʱ��, ��ǰ����һ�����ó�ʱʱ���¼���� */
sapp_global_mthread[pstream->threadnum].tcp_stream_special_timeout_num++;
diff --git a/src/timer/sapp_timer.c b/src/timer/sapp_timer.c
index ba74ebe..1df7bae 100644
--- a/src/timer/sapp_timer.c
+++ b/src/timer/sapp_timer.c
@@ -219,7 +219,7 @@ void __st_pkt_proc_context_check_timeout(int tid)
return;
}
- if(inner_h->event_cnt <= 0)
+ if(likely(inner_h->event_cnt) <= 0)
{
return;
}