From 9789c55ef944ffdbfd7b2bdaf9d2a210f6572a32 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: 星期三, 20 一月 2021 20:42:58 +0800 Subject: [PATCH] 增加SSE前端推送支持 --- src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java index e171297..c564edd 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -121,7 +121,9 @@ logger.debug(evt.getRequest().toString()); // 鐢变簬jainsip鏄崟绾跨▼绋嬪簭锛屼负鎻愰珮鎬ц兘骞跺彂澶勭悊 processThreadPool.execute(() -> { - processorFactory.createRequestProcessor(evt).process(); + if (processorFactory != null) { + processorFactory.createRequestProcessor(evt).process(); + } }); } @@ -130,7 +132,7 @@ Response response = evt.getResponse(); logger.debug(evt.getResponse().toString()); int status = response.getStatusCode(); - if ((status >= 200) && (status < 300)) { // Success! + if (((status >= 200) && (status < 300)) || status == 401) { // Success! ISIPResponseProcessor processor = processorFactory.createResponseProcessor(evt); try { processor.process(evt, this, sipConfig); -- Gitblit v1.8.0