Address review findings on the VNC server, session auth and capture decoder

This commit is contained in:
Viktor Liu
2026-08-27 18:33:52 +02:00
parent 09e069a175
commit 47d8f912e5
18 changed files with 179 additions and 72 deletions
+4 -1
View File
@@ -4,6 +4,7 @@ package server
import (
"encoding/binary"
"errors"
"fmt"
"image"
"io"
@@ -201,7 +202,9 @@ func (s *session) serve() {
<-encoderDone
}()
if err := s.messageLoop(); err != nil && err != io.EOF {
// messageLoop only ever returns an error, so the interesting question is
// which one: a clean client disconnect is io.EOF and not worth a warning.
if err := s.messageLoop(); !errors.Is(err, io.EOF) {
s.log.Warnf("client %s disconnected: %v", s.addr(), err)
} else {
s.log.Infof("client disconnected: %s", s.addr())