Skip to content

Commit c75db3f

Browse files
author
Stephen Asbury
committed
Added a check to prevent double event notification
Fixes #274
1 parent 2b2526a commit c75db3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/nats/client/impl/NatsConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ void updateStatus(Status newStatus) {
15101510

15111511
statusLock.lock();
15121512
try {
1513-
if (oldStatus == Status.CLOSED) {
1513+
if (oldStatus == Status.CLOSED || newStatus == oldStatus) {
15141514
return;
15151515
}
15161516
this.status = newStatus;

0 commit comments

Comments
 (0)