diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/instance.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/db/instance.cpp b/db/instance.cpp index 5a81f558b88..ff9a9b54c99 100644 --- a/db/instance.cpp +++ b/db/instance.cpp @@ -254,8 +254,14 @@ namespace mongo { Client& c = cc(); c.clearns(); - - CurOp& currentOp = *c.curop(); + + auto_ptr<CurOp> nestedOp; + CurOp* currentOpP = c.curop(); + if ( currentOpP->active() ){ + nestedOp.reset( new CurOp() ); + currentOpP = nestedOp.get(); + } + CurOp& currentOp = *currentOpP; currentOp.reset(client); currentOp.setOp(op); |