Skip to content

Commit

Permalink
调用 RPC 前验证 TR 的 Session 的有效性
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Apr 8, 2024
1 parent 793364f commit ebaf8af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.ghostchu.peerbanhelper</groupId>
<artifactId>peerbanhelper</artifactId>
<version>2.4</version>
<version>2.5</version>

<name>PeerBanHelper</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ebaf8af

Please sign in to comment.