security
This commit is contained in:
parent
02495c9e43
commit
b077097a33
8 changed files with 304 additions and 66 deletions
|
|
@ -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 () =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue