Skip to content

Commit 7ae6d67

Browse files
Enable medieval shutdown
1 parent 341f8da commit 7ae6d67

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/main/java/com/github/shyiko/mysql/binlog/NewBinaryLogClient.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,15 @@ private void listenForEventPackets(final PacketChannel channel) throws IOExcepti
976976
}
977977
}
978978
} finally {
979-
abortRequest = false;
980979
if (connected) {
981-
if (completeShutdown) {
980+
if (completeShutdown || abortRequest) {
981+
System.out.println("***********");
982+
System.out.println("MEDIEVAL ABORT ENGAGED");
983+
System.out.println("***********");
982984
disconnect(); // initiate complete shutdown sequence (which includes keep alive thread)
985+
System.out.println("***********");
986+
System.out.println("DISCONNECTED");
987+
System.out.println("***********");
983988
} else {
984989
closeChannel(channel);
985990
}
@@ -1174,7 +1179,13 @@ public void disconnect() throws IOException {
11741179

11751180
terminateKeepAliveThread(keepAliveThreadExecutor);
11761181
closeChannel(channel);
1182+
System.out.println("**********");
1183+
System.out.println("WAITING");
1184+
System.out.println("**********");
11771185
waitForConnectToTerminate(connectLatch);
1186+
System.out.println("**********");
1187+
System.out.println("DONE");
1188+
System.out.println("**********");
11781189
}
11791190

11801191
@Override

0 commit comments

Comments
 (0)