1.解决轮询内存增长过快问题

This commit is contained in:
xingqiao 2022-08-26 11:03:43 +08:00
parent 942c5caa7c
commit 3c025a5ac0

View File

@ -26,11 +26,17 @@ public class TimeoutProcessorImpl implements InitializingBean, ITimeoutProcessor
@Override @Override
public void process(TimeoutEvent event) { public void process(TimeoutEvent event) {
try {
// TODO Auto-generated method stub // TODO Auto-generated method stub
CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId(); CallIdHeader callIdHeader = event.getClientTransaction().getDialog().getCallId();
String callId = callIdHeader.getCallId(); String callId = callIdHeader.getCallId();
SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId); SipSubscribe.Event errorSubscribe = sipSubscribe.getErrorSubscribe(callId);
SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event); SipSubscribe.EventResult<TimeoutEvent> timeoutEventEventResult = new SipSubscribe.EventResult<>(event);
errorSubscribe.response(timeoutEventEventResult); errorSubscribe.response(timeoutEventEventResult);
sipSubscribe.removeErrorSubscribe(callId);
sipSubscribe.removeOkSubscribe(callId);
} catch (Exception e) {
e.printStackTrace();
}
} }
} }