mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fixed session if changing in the Web Socket Chat bot.
This commit is contained in:
parent
bd55fc3ed3
commit
05afeaf5bc
1 changed files with 3 additions and 3 deletions
|
|
@ -99,15 +99,15 @@ public class WebSocketServer
|
|||
{
|
||||
var message = Encoding.UTF8.GetString(messageBuffer.ToArray());
|
||||
messageBuffer.Clear();
|
||||
MessageReceived?.Invoke(sessionId, message);
|
||||
MessageReceived?.Invoke(session.SessionId, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { /* connection dropped */ }
|
||||
finally
|
||||
{
|
||||
_sessions.TryRemove(sessionId, out _);
|
||||
SessionDropped?.Invoke(sessionId);
|
||||
_sessions.TryRemove(session.SessionId, out _);
|
||||
SessionDropped?.Invoke(session.SessionId);
|
||||
|
||||
if (ws.State == WebSocketState.Open || ws.State == WebSocketState.CloseReceived)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue