File tree 1 file changed +6
-1
lines changed
driver-core/src/main/com/mongodb/internal/connection 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 28
28
import com .mongodb .MongoSocketWriteException ;
29
29
import com .mongodb .RequestContext ;
30
30
import com .mongodb .ServerAddress ;
31
+ import com .mongodb .UnixServerAddress ;
31
32
import com .mongodb .annotations .NotThreadSafe ;
32
33
import com .mongodb .connection .AsyncCompletionHandler ;
33
34
import com .mongodb .connection .ClusterConnectionMode ;
@@ -267,7 +268,11 @@ public void failed(final Throwable t) {
267
268
}
268
269
269
270
private ServerAddress getServerAddressWithResolver () {
270
- return new ServerAddressWithResolver (serverId .getAddress (), inetAddressResolver );
271
+ if (serverId .getAddress () instanceof UnixServerAddress ) {
272
+ return serverId .getAddress ();
273
+ } else {
274
+ return new ServerAddressWithResolver (serverId .getAddress (), inetAddressResolver );
275
+ }
271
276
}
272
277
273
278
private void initAfterHandshakeStart (final InternalConnectionInitializationDescription initializationDescription ) {
You can’t perform that action at this time.
0 commit comments