Refactor websocket session sync (#44)

* refactor websocket peer and comment functions.

* update comments.

* add DestroyWebSocketPeer.
This commit is contained in:
Miroslav Šedivý
2023-04-23 11:23:20 +02:00
committed by GitHub
parent 43f8fe339f
commit 0ea1c2870f
5 changed files with 84 additions and 61 deletions

View File

@ -142,7 +142,7 @@ func (manager *SessionManagerCtx) Delete(id string) error {
manager.sessionsMu.Unlock()
if session.State().IsConnected {
session.GetWebSocketPeer().Destroy("session deleted")
session.DestroyWebSocketPeer("session deleted")
}
if session.State().IsWatching {