Skip to content

Commit 535b651

Browse files
committed
Prevented BinaryLogClient from getting stuck while in "pre-close"
1 parent 79868ee commit 535b651

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/github/shyiko/mysql/binlog/network/protocol/PacketChannel.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ public boolean isOpen() {
7575

7676
@Override
7777
public void close() throws IOException {
78+
try {
79+
socket.shutdownInput(); // for socketInputStream.setEOF(true)
80+
} catch (Exception ignore) {}
81+
try {
82+
socket.shutdownOutput();
83+
} catch (Exception ignore) {}
7884
socket.close();
7985
}
8086
}

0 commit comments

Comments
 (0)