From 943f95ba8ce02f8088f2dfcfd83a60391a8a65a6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 14 三月 2023 14:02:33 +0800 Subject: [PATCH] 增加消息通道配置,可以通道redis在wvp上下级之间发送消息 --- src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRESTfulUtils.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) 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 2815e64..3610f31 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 @@ -36,9 +36,9 @@ // 璁剧疆杩炴帴瓒呮椂鏃堕棿 httpClientBuilder.connectTimeout(5,TimeUnit.SECONDS); // 璁剧疆璇诲彇瓒呮椂鏃堕棿 - httpClientBuilder.readTimeout(5,TimeUnit.SECONDS); + httpClientBuilder.readTimeout(10,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); @@ -186,6 +186,7 @@ FileOutputStream outStream = new FileOutputStream(snapFile); outStream.write(Objects.requireNonNull(response.body()).bytes()); + outStream.flush(); outStream.close(); } else { logger.error(String.format("[ %s ]璇锋眰澶辫触: %s %s", url, response.code(), response.message())); -- Gitblit v1.8.0