mysql-binlog-connector-java
mysql-binlog-connector-java copied to clipboard
BinaryLogClient disconnect
Hi,
How to properly disconnect BinaryLogClient?
I created a shutdown hook in my application in which I am calling binaryLogClient.disconnect(), but mysql server does not receive any event about connection termination and throws errors:
- Got an error reading communication packets
- failed on flush_net()
I know that these errors are not critical for mysql server, but I am just wondering is there a proper way to handle it?
This Is my code: eventTask.stop();//eventTask is Event thread this.client.disconnect();