Commit 01bc6c857e49597df0f1b2e8c5d482786db3a475

Authored by 648540858
Committed by GitHub
2 parents 8237cd25 7749ea34

Merge pull request #908 from cnless/wvp-28181-2.0

fix:修复ResponseBody未关闭以及点播超时报错AsyncRequestTimeoutException
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
@@ -192,10 +192,10 @@ public class ZLMRESTfulUtils { @@ -192,10 +192,10 @@ public class ZLMRESTfulUtils {
192 } else { 192 } else {
193 logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); 193 logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message()));
194 } 194 }
195 - Objects.requireNonNull(response.body()).close();  
196 } else { 195 } else {
197 logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); 196 logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message()));
198 } 197 }
  198 + Objects.requireNonNull(response.body()).close();
199 } catch (ConnectException e) { 199 } catch (ConnectException e) {
200 logger.error(String.format("连接ZLM失败: %s, %s", e.getCause().getMessage(), e.getMessage())); 200 logger.error(String.format("连接ZLM失败: %s, %s", e.getCause().getMessage(), e.getMessage()));
201 logger.info("请检查media配置并确认ZLM已启动..."); 201 logger.info("请检查media配置并确认ZLM已启动...");
src/main/resources/all-application.yml
@@ -5,6 +5,10 @@ @@ -5,6 +5,10 @@
5 5
6 6
7 spring: 7 spring:
  8 + # 设置接口超时时间
  9 + mvc:
  10 + async:
  11 + request-timeout: 20000
8 # [可选]上传文件大小限制 12 # [可选]上传文件大小限制
9 servlet: 13 servlet:
10 multipart: 14 multipart:
src/main/resources/application-dev.yml
1 spring: 1 spring:
  2 + # 设置接口超时时间
  3 + mvc:
  4 + async:
  5 + request-timeout: 20000
2 thymeleaf: 6 thymeleaf:
3 cache: false 7 cache: false
4 # [可选]上传文件大小限制 8 # [可选]上传文件大小限制