diff --git a/main/protocols/websocket_protocol.cc b/main/protocols/websocket_protocol.cc index 156276e5..5b965103 100644 --- a/main/protocols/websocket_protocol.cc +++ b/main/protocols/websocket_protocol.cc @@ -40,7 +40,7 @@ void WebsocketProtocol::SendText(const std::string& text) { } bool WebsocketProtocol::IsAudioChannelOpened() const { - return websocket_ != nullptr; + return websocket_ != nullptr && websocket_->IsConnected(); } void WebsocketProtocol::CloseAudioChannel() {