Skip to content

Commit a23acac

Browse files
Move lifecycle hook for beforeConnect earlier so we can change properties of the client based on the feedback we get from it
1 parent 3ff3c9d commit a23acac

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,11 @@ public void connect() throws IOException, IllegalStateException {
579579
channel.authenticationComplete();
580580

581581
connectionId = greetingPacket.getThreadId();
582+
583+
for (LifecycleListener lifecycleListener : lifecycleListeners) {
584+
lifecycleListener.beforeConnect(this);
585+
}
586+
582587
if ("".equals(binlogFilename)) {
583588
setupGtidSet();
584589
}
@@ -595,10 +600,6 @@ public void connect() throws IOException, IllegalStateException {
595600
gtid = null;
596601
tx = false;
597602

598-
for (LifecycleListener lifecycleListener : lifecycleListeners) {
599-
lifecycleListener.beforeConnect(this);
600-
}
601-
602603
requestBinaryLogStream();
603604
} catch (IOException e) {
604605
disconnectChannel();

0 commit comments

Comments
 (0)