Skip to content

Commit 66d759b

Browse files
committed
JAVA-2044: In ServerMonitor reset currentException to null each time through the loop. This will ensure that a successful connection after a failed connection will be properly logged.
1 parent 64a860e commit 66d759b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/com/mongodb/ServerMonitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public void run() {
8383
while (!isClosed) {
8484
ServerDescription previousServerDescription = currentServerDescription;
8585
Throwable previousException = currentException;
86+
currentException = null;
8687
try {
8788
if (connection == null) {
8889
connection = new DBPort(serverAddress, mongo, getOptions());

0 commit comments

Comments
 (0)