diff --git a/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java b/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java index e4b8b4df..e3f1857c 100644 --- a/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java +++ b/src/main/java/com/github/shyiko/mysql/binlog/BinaryLogClient.java @@ -837,6 +837,9 @@ public void run() { try { setConnectTimeout(timeout); connect(); + } catch (IOException e) { + exceptionReference.set(e); + countDownLatch.countDown(); // making sure we don't end up waiting whole "timeout" } catch (Exception e) { exceptionReference.set(new IOException(e)); // method is asynchronous, catch all exceptions so that they are not lost countDownLatch.countDown(); // making sure we don't end up waiting whole "timeout"