fix(websockets): Close stream before attempting to connect again (#6805)
This commit is contained in:
@@ -143,6 +143,14 @@ void WebSocketConnectionHelper<Derived, Inner>::onTcpHandshake(
|
||||
qCDebug(chatterinoWebsocket)
|
||||
<< *this << "error in tcp handshake" << ep.address().to_string()
|
||||
<< ec.message();
|
||||
|
||||
beast::get_lowest_layer(this->stream).socket().close(ec);
|
||||
if (ec)
|
||||
{
|
||||
qCDebug(chatterinoWebsocket)
|
||||
<< *this << "closing websocket after error" << ec.message();
|
||||
}
|
||||
|
||||
this->tryConnect(++endpointIterator);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user