We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e02a28 commit daa7f74Copy full SHA for daa7f74
src/main/com/mongodb/DBCursor.java
@@ -678,10 +678,14 @@ public DBCollection getCollection(){
678
* @return
679
*/
680
public ServerAddress getServerAddress() {
681
- if (_it != null) {
682
- if (_it instanceof DBApiLayer.Result)
683
- return ((DBApiLayer.Result)_it).getServerAddress();
684
- }
+ if (_it != null && _it instanceof DBApiLayer.Result)
+ return ((DBApiLayer.Result)_it).getServerAddress();
+
+ _check();
685
686
687
688
689
return null;
690
}
691
0 commit comments