close ws gracefully to avoid stale joiners

This commit is contained in:
kulikov0 committed 2026-07-25 18:14:21 +02:00
1 parent 1dad19e6b6
commit c89688afd2
9 files changed
+32 -14

No files matched your search

@@ -214,9 +214,7 @@ func (j *TelemostHeadlessJoiner) Close() {
ws := j.ws
j.ws = nil
j.wsMu.Unlock()
if ws != nil {
ws.Close()
}
common.CloseWS(ws)
if j.vp8tunnel != nil {
j.vp8tunnel.Stop()
}
@@ -585,9 +583,7 @@ func (j *TelemostHeadlessJoiner) forceReconnect(reason string) {
j.wsMu.Lock()
ws := j.ws
j.wsMu.Unlock()
if ws != nil {
ws.Close()
}
common.CloseWS(ws)
}
func (j *TelemostHeadlessJoiner) sendStartupSlotsRamp() {