summaryrefslogtreecommitdiff
path: root/src/mongo/s/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/server.cpp')
-rw-r--r--src/mongo/s/server.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 57a65015e33..f7e647662f9 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -107,6 +107,12 @@ namespace mongo {
try {
r.init();
r.process();
+
+ // Release connections after non-write op
+ if ( ShardConnection::releaseConnectionsAfterResponse && r.expectResponse() ) {
+ LOG(2) << "release thread local connections back to pool" << endl;
+ ShardConnection::releaseMyConnections();
+ }
}
catch ( AssertionException & e ) {
LOG( e.isUserAssertion() ? 1 : 0 ) << "AssertionException while processing op type : " << m.operation() << " to : " << r.getns() << causedBy(e) << endl;