Commit cec266d3cd27e79e61b7e614d0c85e0b43492115
1 parent
f4e5e039
修复请求报错404等情况下导致ResponseBody未关闭的问题
Showing
1 changed file
with
1 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java
| ... | ... | @@ -192,10 +192,10 @@ public class ZLMRESTfulUtils { |
| 192 | 192 | } else { |
| 193 | 193 | logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); |
| 194 | 194 | } |
| 195 | - Objects.requireNonNull(response.body()).close(); | |
| 196 | 195 | } else { |
| 197 | 196 | logger.error(String.format("[ %s ]请求失败: %s %s", url, response.code(), response.message())); |
| 198 | 197 | } |
| 198 | + Objects.requireNonNull(response.body()).close(); | |
| 199 | 199 | } catch (ConnectException e) { |
| 200 | 200 | logger.error(String.format("连接ZLM失败: %s, %s", e.getCause().getMessage(), e.getMessage())); |
| 201 | 201 | logger.info("请检查media配置并确认ZLM已启动..."); | ... | ... |