Commit 48896474e6405f69f5033970538809dbc112a356
1 parent
6968839f
检查设备是否存在, 不存在则不回复心跳
Showing
1 changed file
with
9 additions
and
5 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java
| ... | ... | @@ -315,12 +315,16 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor { |
| 315 | 315 | try { |
| 316 | 316 | Element rootElement = getRootElement(evt); |
| 317 | 317 | String deviceId = XmlUtil.getText(rootElement, "DeviceID"); |
| 318 | - // 回复200 OK | |
| 319 | - responseAck(evt); | |
| 320 | - if (offLineDetector.isOnline(deviceId)) { | |
| 321 | - publisher.onlineEventPublish(deviceId, VideoManagerConstants.EVENT_ONLINE_KEEPLIVE); | |
| 322 | - } else { | |
| 318 | + // 检查设备是否存在, 不存在则不回复 | |
| 319 | + if (storager.exists(deviceId)) { | |
| 320 | + // 回复200 OK | |
| 321 | + responseAck(evt); | |
| 322 | + if (offLineDetector.isOnline(deviceId)) { | |
| 323 | + publisher.onlineEventPublish(deviceId, VideoManagerConstants.EVENT_ONLINE_KEEPLIVE); | |
| 324 | + } else { | |
| 325 | + } | |
| 323 | 326 | } |
| 327 | + | |
| 324 | 328 | } catch (ParseException | SipException | InvalidArgumentException | DocumentException e) { |
| 325 | 329 | e.printStackTrace(); |
| 326 | 330 | } | ... | ... |