mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-22 21:53:43 +00:00
Handle initial connect failure better.
This commit is contained in:
parent
fbd8d6897d
commit
7c07dba3f7
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ void RpcConnection::Open()
|
||||||
|
|
||||||
void RpcConnection::Close()
|
void RpcConnection::Close()
|
||||||
{
|
{
|
||||||
if (onDisconnect && state == State::Connected) {
|
if (onDisconnect && (state == State::Connected || state == State::SentHandshake)) {
|
||||||
onDisconnect(lastErrorCode, lastErrorMessage);
|
onDisconnect(lastErrorCode, lastErrorMessage);
|
||||||
}
|
}
|
||||||
connection->Close();
|
connection->Close();
|
||||||
|
|
Loading…
Reference in a new issue