diff options
Diffstat (limited to 'client/connpool.h')
-rw-r--r-- | client/connpool.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/connpool.h b/client/connpool.h index f39fc8da8ae..6bdd81a531b 100644 --- a/client/connpool.h +++ b/client/connpool.h @@ -65,8 +65,10 @@ namespace mongo { void flush(); DBClientBase *get(const string& host); void release(const string& host, DBClientBase *c) { - if ( c->isFailed() ) + if ( c->isFailed() ){ + delete c; return; + } scoped_lock L(_mutex); _pools[host]->pool.push(c); } |