| 191 | } |
| 192 | |
| 193 | bool UniverseConnectionServer::connectionIsOpen(ConnectionId clientId) const { |
| 194 | RecursiveMutexLocker connectionsLocker(m_connectionsMutex); |
| 195 | if (auto conn = m_connections.value(clientId)) { |
| 196 | connectionsLocker.unlock(); |
| 197 | MutexLocker connectionLocker(conn->mutex); |
| 198 | return conn->packetSocket->isOpen(); |
| 199 | } |
| 200 | |
| 201 | throw UniverseConnectionException::format("No such client '{}' in UniverseConnectionServer::connectionIsOpen", clientId); |
| 202 | } |
| 203 | |
| 204 | int64_t UniverseConnectionServer::lastActivityTime(ConnectionId clientId) const { |
| 205 | RecursiveMutexLocker connectionsLocker(m_connectionsMutex); |
no test coverage detected