fix(websockets): Close stream before attempting to connect again (#6805)
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
- Bugfix: Disable "Sort Tabs Alphabetically" action when notebook layout is locked. (#6710)
|
||||
- Bugfix: Fix highlight mentions not updating when username changes. (#6723, #6739)
|
||||
- Bugfix: Fixed Return and Enter being treated as different keys on Mac OS. (#6726)
|
||||
- Bugfix: Fixed WebSockets for 7TV or BTTV not connecting on Windows if IPv6 attempts fail. (#6805)
|
||||
- Bugfix: Fixed portable updates not showing an error if the updater is not present. (#6801)
|
||||
- Dev: Nightly builds are now defined through a build flag rather than the Modes file. (#6798)
|
||||
- Dev: Update release documentation. (#6498)
|
||||
|
||||
@@ -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