MCPcopy Create free account
hub / github.com/apache/thrift / onClientDisconnected

Method onClientDisconnected

lib/cpp/src/thrift/server/TThreadedServer.cpp:124–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void TThreadedServer::onClientDisconnected(TConnectedClient* pClient) {
125 Synchronized sync(clientMonitor_);
126 drainDeadClients(); // use the outgoing thread to do some maintenance on our dead client backlog
127 auto it = activeClientMap_.find(pClient);
128 if (it != activeClientMap_.end()) {
129 auto end = it;
130 deadClientMap_.insert(it, ++end);
131 activeClientMap_.erase(it);
132 }
133 if (activeClientMap_.empty()) {
134 clientMonitor_.notify();
135 }
136}
137
138TThreadedServer::TConnectedClientRunner::TConnectedClientRunner(const shared_ptr<TConnectedClient>& pClient)
139 : pClient_(pClient) {

Callers

nothing calls this directly

Calls 4

findMethod · 0.80
emptyMethod · 0.80
endMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected