MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / checkForSessionTimeout

Method checkForSessionTimeout

src/Stream.cpp:256–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void Stream::checkForSessionTimeout() {
257 base::MutexLock lock(_mutex);
258
259 for (std::size_t i = 0; i < MAX_CLIENTS; ++i) {
260 if (_client[i].sessionTimeout() || !_enabled) {
261 if (_enabled) {
262 SI_LOG_INFO("Stream: %d, Watchdog kicked in for StreamClient[%d] with SessionID %s",
263 _streamID, i, _client[i].getSessionID().c_str());
264 } else {
265 SI_LOG_INFO("Stream: %d, Reclaiming StreamClient[%d] with SessionID %s",
266 _streamID, i, _client[i].getSessionID().c_str());
267 }
268 teardown(i);
269 close(i);
270 }
271 }
272}
273
274bool Stream::update(int clientID, bool start) {
275 base::MutexLock lock(_mutex);

Callers 1

threadEntryMethod · 0.45

Calls 2

sessionTimeoutMethod · 0.80
getSessionIDMethod · 0.80

Tested by

no test coverage detected