Skip to content

Commit 489b09e

Browse files
authored
Connection.forceDisconnect should also set the connection as broken #4233 (#4258)
Address: Connection.forceDisconnect should also set the connection as broken #4233
1 parent a0e29ee commit 489b09e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/redis/clients/jedis/Connection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ public void disconnect() {
326326
}
327327

328328
public void forceDisconnect() throws IOException {
329-
socket.close();
329+
setBroken();
330+
IOUtils.closeQuietly(socket);
330331
}
331332

332333
public boolean isConnected() {

0 commit comments

Comments
 (0)