Skip to content

Commit

Permalink
Remove duplicate reconnect event (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottf committed May 20, 2024
1 parent 87b0abc commit f090bed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/nats/client/impl/NatsConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ else if (first.equals(cur)) {

processConnectionEvent(Events.RESUBSCRIBED);

processConnectionEvent(Events.RECONNECTED);

// When the flush returns we are done sending internal messages,
// so we can switch to the non-reconnect queue
this.writer.setReconnectMode(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void testDisconnectReconnectCount() throws Exception {

try (NatsTestServer ts = new NatsTestServer(port, false)) {
standardConnectionWait(nc);
assertEquals(2, listener.getEventCount(Events.RECONNECTED));
assertEquals(1, listener.getEventCount(Events.RECONNECTED));
assertEquals(ts.getURI(), nc.getConnectedUrl());
standardCloseConnection(nc);
}
Expand Down

0 comments on commit f090bed

Please sign in to comment.