Temporary websocket disconnect handling (#6)

* fix websocket close log error.

* logger session interface no pointer.

* websocket delayet disconnect.

* session host: save id not pointer to a session.

* fix if hostId not stored.
This commit is contained in:
Miroslav Šedivý 2022-08-26 20:16:40 +02:00 committed by GitHub
parent 5612b80634
commit 691150900b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 122 additions and 61 deletions

View file

@ -12,14 +12,16 @@ import (
)
func (h *MessageHandlerCtx) systemInit(session types.Session) error {
host := h.sessions.GetHost()
host, hasHost := h.sessions.GetHost()
controlHost := message.ControlHost{
HasHost: host != nil,
var hostID string
if hasHost {
hostID = host.ID()
}
if controlHost.HasHost {
controlHost.HostID = host.ID()
controlHost := message.ControlHost{
HasHost: hasHost,
HostID: hostID,
}
size := h.desktop.GetScreenSize()