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