Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Fixed some crashes related to the new XMPP and TCP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Feb 27, 2020
1 parent cf1cd90 commit c5d669e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion XMPP_API/Classes/Network/TCP/TcpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ private void CancelConnectionAttempt()
{
if (!disposed)
{
connectCTS.Cancel();
connectCTS?.Cancel();
}
}

Expand Down
2 changes: 2 additions & 0 deletions XMPP_API/Classes/Network/XmppConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ public async Task ConnectAsync()
public async Task DisconnectAsync()
{
await CONNECT_DISCONNECT_SEMA.WaitAsync();
holdConnection = false;
reconnectRequested = false;
await InternalDisconnectAsync();
CONNECT_DISCONNECT_SEMA.Release();
}
Expand Down

0 comments on commit c5d669e

Please sign in to comment.