| 89 | } |
| 90 | |
| 91 | void FreeDvClient::stopConnection() |
| 92 | { |
| 93 | m_intentionalDisconnect = true; |
| 94 | if (m_pingTimer) m_pingTimer->stop(); |
| 95 | if (m_reconnectTimer) m_reconnectTimer->stop(); |
| 96 | |
| 97 | if (m_ws && m_ws->state() != QAbstractSocket::UnconnectedState) |
| 98 | m_ws->close(); |
| 99 | |
| 100 | m_connected.store(false); |
| 101 | emit stationsCleared(); |
| 102 | m_stations.clear(); |
| 103 | emit stopped(); |
| 104 | } |
| 105 | |
| 106 | // ── WebSocket slots ───────────────────────────────────────────────────── |
| 107 |
no test coverage detected