File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/github/shyiko/mysql/binlog Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -495,8 +495,9 @@ public void setThreadFactory(ThreadFactory threadFactory) {
495495 * @throws AuthenticationException if authentication fails
496496 * @throws ServerException if MySQL server responds with an error
497497 * @throws IOException if anything goes wrong while trying to connect
498+ * @throws IllegalStateException if binary log client is already connected
498499 */
499- public void connect () throws IOException {
500+ public void connect () throws IOException , IllegalStateException {
500501 if (!connectLock .tryLock ()) {
501502 throw new IllegalStateException ("BinaryLogClient is already connected" );
502503 }
@@ -836,8 +837,8 @@ public void run() {
836837 try {
837838 setConnectTimeout (timeout );
838839 connect ();
839- } catch (IOException e ) {
840- exceptionReference .set (e );
840+ } catch (Exception e ) {
841+ exceptionReference .set (new IOException ( e )); // method is asynchronous, catch all exceptions so that they are not lost
841842 countDownLatch .countDown (); // making sure we don't end up waiting whole "timeout"
842843 }
843844 }
You can’t perform that action at this time.
0 commit comments