File tree Expand file tree Collapse file tree
src/robomongo/core/mongodb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -583,15 +583,18 @@ namespace Robomongo
583583 errorStr.contains (" FindCommandRequest.ntoreturn" , Qt::CaseInsensitive);
584584
585585 // If we have this DocumentDB/Modern Mongo specific error, try again
586- if (ntoreturnError && _dbclient) {
587- sendLog (this , LogEvent::RBM_ERROR, std::string (ex.what ()));
588- try {
589- _dbclient->tagAsDocDb (true );
590- executeQuery ();
591- return ;
592- }
593- catch (const std::exception &ex) {
594- sendLog (this , LogEvent::RBM_ERROR, " Re-try: " + std::string (ex.what ()));
586+ if (ntoreturnError) {
587+ mongo::DBClientBase *conn = getConnection (true ).first ;
588+ if (conn) {
589+ sendLog (this , LogEvent::RBM_ERROR, std::string (ex.what ()));
590+ try {
591+ conn->tagAsDocDb (true );
592+ executeQuery ();
593+ return ;
594+ }
595+ catch (const std::exception &ex) {
596+ sendLog (this , LogEvent::RBM_ERROR, " Re-try: " + std::string (ex.what ()));
597+ }
595598 }
596599 }
597600
You can’t perform that action at this time.
0 commit comments