diff options
Diffstat (limited to 'src/mongo/client/dbclient_rs.cpp')
-rw-r--r-- | src/mongo/client/dbclient_rs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp index 53e5baaa3ee..0f0e78a8c90 100644 --- a/src/mongo/client/dbclient_rs.cpp +++ b/src/mongo/client/dbclient_rs.cpp @@ -987,9 +987,9 @@ namespace { return false; if ( ns ) { - QueryResult * res = (QueryResult*)response.singleData(); - if ( res->nReturned == 1 ) { - BSONObj x(res->data() ); + QueryResult::View res = response.singleData().view2ptr(); + if ( res.getNReturned() == 1 ) { + BSONObj x(res.data() ); if ( str::contains( ns , "$cmd" ) ) { if ( isNotMasterErrorString( x["errmsg"] ) ) isntMaster(); |