diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java index 2815e643..99a695eb 100644 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java @@ -38,7 +38,7 @@ public class ZLMRESTfulUtils { // 设置读取超时时间 httpClientBuilder.readTimeout(5,TimeUnit.SECONDS); // 设置连接池 - httpClientBuilder.connectionPool(new ConnectionPool(16, 10, TimeUnit.SECONDS)); + httpClientBuilder.connectionPool(new ConnectionPool(16, 5, TimeUnit.MINUTES)); if (logger.isDebugEnabled()) { HttpLoggingInterceptor logging = new HttpLoggingInterceptor(message -> { logger.debug("http请求参数:" + message); diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index d9f922ae..db4d7b33 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -169,7 +169,6 @@ public class MediaServerServiceImpl implements IMediaServerService { return; } zlmrtpServerFactory.closeRtpServer(mediaServerItem, streamId); - releaseSsrc(mediaServerItem.getId(), streamId); } @Override diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index 23d4d726..d4694c52 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -5,7 +5,6 @@ import com.genersoft.iot.vmp.conf.DynamicTask; import com.genersoft.iot.vmp.conf.exception.ControllerException; import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; -import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder; import com.genersoft.iot.vmp.gb28181.bean.SyncStatus; import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask; import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask; @@ -25,7 +24,6 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.apache.commons.compress.utils.IOUtils; -import org.apache.http.HttpResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -33,15 +31,15 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.ObjectUtils; -import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.context.request.async.DeferredResult; import javax.servlet.http.HttpServletResponse; -import javax.sip.DialogState; import javax.sip.InvalidArgumentException; import javax.sip.SipException; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.nio.file.Files; import java.text.ParseException; import java.util.*; @@ -145,7 +143,7 @@ public class DeviceQuery { */ @Operation(summary = "同步设备通道") @Parameter(name = "deviceId", description = "设备国标编号", required = true) - @PostMapping("/devices/{deviceId}/sync") + @GetMapping("/devices/{deviceId}/sync") public WVPResult devicesSync(@PathVariable String deviceId){ if (logger.isDebugEnabled()) { diff --git a/web_src/src/components/DeviceList.vue b/web_src/src/components/DeviceList.vue index e15f340d..29e049da 100644 --- a/web_src/src/components/DeviceList.vue +++ b/web_src/src/components/DeviceList.vue @@ -207,7 +207,7 @@ export default { console.log("刷新对应设备:" + itemData.deviceId); let that = this; this.$axios({ - method: 'post', + method: 'get', url: '/api/device/query/devices/' + itemData.deviceId + '/sync' }).then((res) => { console.log("刷新设备结果:" + JSON.stringify(res));