hopefully fix

This commit is contained in:
KingKDot
2026-06-16 17:51:41 -05:00
parent a6d6b4d31b
commit 932b7cbc33
6 changed files with 36 additions and 12 deletions
+2 -2
View File
@@ -547,7 +547,7 @@ func runSession(ctx context.Context, cancel context.CancelFunc, conn *websocket.
sendCtx, sendCancel := context.WithTimeout(context.Background(), 2*time.Second)
defer sendCancel()
_ = wire.WriteMsg(sendCtx, conn, di)
conn.Close(websocket.StatusNormalClosure, "bye")
conn.CloseNow()
}()
identity := config.DeriveIdentity()
@@ -747,8 +747,8 @@ func runSession(ctx context.Context, cancel context.CancelFunc, conn *websocket.
last := env.LastPong()
if !last.IsZero() && time.Since(last) > grace {
log.Printf("ping: no pong for %s, forcing reconnect", time.Since(last))
conn.Close(websocket.StatusGoingAway, "pong timeout")
cancel()
conn.CloseNow()
return
}
}