File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
driver-core/src/main/com/mongodb/connection Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ protected void connect() {
9393
9494 @ Override
9595 public void close () {
96- if (! isClosed () ) {
97- synchronized ( this ) {
96+ synchronized ( this ) {
97+ if (! isClosed () ) {
9898 for (final ServerTuple serverTuple : addressToServerTupleMap .values ()) {
9999 serverTuple .server .close ();
100100 }
@@ -123,12 +123,12 @@ public void stateChanged(final ChangeEvent<ServerDescription> event) {
123123 }
124124
125125 private void onChange (final ChangeEvent <ServerDescription > event ) {
126- if (isClosed ()) {
127- return ;
128- }
129-
130126 boolean shouldUpdateDescription = true ;
131127 synchronized (this ) {
128+ if (isClosed ()) {
129+ return ;
130+ }
131+
132132 ServerDescription newDescription = event .getNewValue ();
133133
134134 if (LOGGER .isTraceEnabled ()) {
You can’t perform that action at this time.
0 commit comments