attempt to fix double remuser issue
This commit is contained in:
parent
9c985928fe
commit
b2dd906b02
1 changed files with 3 additions and 1 deletions
|
@ -75,7 +75,7 @@ public class User
|
|||
|
||||
public async Task SendAsync(string msg)
|
||||
{
|
||||
if (socket.State != WebSocketState.Open)
|
||||
if (_disposed || socket.State != WebSocketState.Open)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -573,6 +573,8 @@ public class User
|
|||
}
|
||||
public async Task Close(bool sendDisconnect = true)
|
||||
{
|
||||
if (_disposed) return;
|
||||
_disposed = true;
|
||||
if (sendDisconnect) SendAsync(Guacutils.Encode("disconnect"));
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue