Browse Source

替换线程不安全的map

pull/31/head
648540858 4 years ago
parent
commit
8d2ad02208
  1. 3
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java

3
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/callback/DeferredResultHolder.java

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.transmit.callback;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@ -24,7 +25,7 @@ public class DeferredResultHolder {
public static final String CALLBACK_CMD_PlAY = "CALLBACK_PLAY";
private Map<String, DeferredResult> map = new HashMap<String, DeferredResult>();
private Map<String, DeferredResult> map = new ConcurrentHashMap<String, DeferredResult>();
public void put(String key, DeferredResult result) {
map.put(key, result);

Loading…
Cancel
Save