security
All checks were successful
Server Build / publish (push) Successful in 30s
Voice Build / publish (push) Successful in 24s

This commit is contained in:
olcxja 2026-08-26 00:11:06 +02:00
commit b077097a33
8 changed files with 304 additions and 66 deletions

View file

@ -90,6 +90,15 @@ public class Requests
}
currentSession = new Session(webSocket);
if (oldSession != null && !ReferenceEquals(oldSession, currentSession))
{
//W4: nadpisujemy wpis w mapie - stara sesja nigdy nie przejdzie przez
//swoją gałąź finally (guard session==currentSession), więc jej kolejkę
//trzeba zamknąć TU. Bez tego task-pump starej sesji wisi wiecznie na
//ReadAllAsync = leak taska + kanału + buforów ArrayPool przy każdym
//reconnectcie
oldSession.SendQueue.Writer.TryComplete();
}
roomClients[clientId] = currentSession;
_ = Task.Run(async () =>