MCPcopy Create free account
hub / github.com/Snapchat/Valdi / closeAllConnections

Method closeAllConnections

valdi/src/valdi/runtime/Debugger/TCPServerImpl.cpp:172–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void TCPServerImpl::closeAllConnections(const Error& error) {
173 while (true) {
174 Ref<TCPServerConnectionImpl> connection;
175
176 {
177 std::lock_guard<Mutex> guard(_mutex);
178 if (_connections.empty()) {
179 return;
180 }
181 connection = *_connections.begin();
182 }
183
184 connection->close(error);
185 }
186}
187
188void TCPServerImpl::appendConnection(const Ref<TCPServerConnectionImpl>& connection) {
189 std::lock_guard<Mutex> guard(_mutex);

Callers 4

restartFunction · 0.45
_stopServerFunction · 0.45
restartFunction · 0.45
_stopServerFunction · 0.45

Calls 3

closeMethod · 0.65
emptyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected