Skip to content

Commit dca4c5c

Browse files
committed
JAVA-2044: In DefaultServerMonitor 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 5b2eb87 commit dca4c5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

driver-core/src/main/com/mongodb/connection/DefaultServerMonitor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public synchronized void run() {
120120
while (!monitorIsClosed) {
121121
ServerDescription previousServerDescription = currentServerDescription;
122122
Throwable previousException = currentException;
123+
currentException = null;
123124
try {
124125
if (connection == null) {
125126
connection = internalConnectionFactory.create(serverId);

0 commit comments

Comments
 (0)