From ebaf8afc33b004874eabb98262abe480651e61fb Mon Sep 17 00:00:00 2001 From: Ghost_chu Date: Mon, 8 Apr 2024 13:01:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8=20RPC=20=E5=89=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=20TR=20=E7=9A=84=20Session=20=E7=9A=84=E6=9C=89?= =?UTF-8?q?=E6=95=88=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../downloader/impl/transmission/Transmission.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4370013822..1d39413abd 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.ghostchu.peerbanhelper peerbanhelper - 2.4 + 2.5 PeerBanHelper diff --git a/src/main/java/com/ghostchu/peerbanhelper/downloader/impl/transmission/Transmission.java b/src/main/java/com/ghostchu/peerbanhelper/downloader/impl/transmission/Transmission.java index 84e73a0482..52280f59d9 100644 --- a/src/main/java/com/ghostchu/peerbanhelper/downloader/impl/transmission/Transmission.java +++ b/src/main/java/com/ghostchu/peerbanhelper/downloader/impl/transmission/Transmission.java @@ -52,6 +52,10 @@ public String getName() { @Override public boolean login() { + RqSessionGet get = new RqSessionGet(List.of("version")); + try { + client.execute(get); // 执行任意 RPC 操作以刷新 session + }catch (Exception ignored){} return true; }