From 3c816a38e8b4434841095b45a270ae8bc3abd90f Mon Sep 17 00:00:00 2001 From: zarazaex69 Date: Sun, 3 May 2026 11:50:04 +0300 Subject: [PATCH] fix: state --- internal/client/client.go | 2 +- internal/server/server.go | 4 ++-- internal/transport/vp8channel/kcp.go | 6 +++--- internal/transport/vp8channel/kcpconn.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/client/client.go b/internal/client/client.go index c87049d..d776717 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -225,7 +225,7 @@ func smuxConfig() *smux.Config { } func (c *Client) handleReconnect() { - logger.Infof("client link reconnect — tearing down smux session") + logger.Infof("client link reconnect - tearing down smux session") c.sessMu.Lock() if c.session != nil { _ = c.session.Close() diff --git a/internal/server/server.go b/internal/server/server.go index 594d9fe..99fb2ae 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -229,7 +229,7 @@ func (s *Server) installSession() { } func (s *Server) handleReconnect() { - logger.Infof("server link reconnect — tearing down smux session") + logger.Infof("server link reconnect - tearing down smux session") s.sessMu.RLock() current := s.session s.sessMu.RUnlock() @@ -296,7 +296,7 @@ func (s *Server) serve(ctx context.Context) { return default: } - logger.Infof("AcceptStream returned %v — reinstalling session", err) + logger.Infof("AcceptStream returned %v - reinstalling session", err) s.reinstallSession(sess) continue } diff --git a/internal/transport/vp8channel/kcp.go b/internal/transport/vp8channel/kcp.go index d140999..570f60b 100644 --- a/internal/transport/vp8channel/kcp.go +++ b/internal/transport/vp8channel/kcp.go @@ -12,7 +12,7 @@ import ( ) // Both peers establish a KCP session with the same convid. KCP does not -// require a handshake — packets are matched by conv field, so a static +// require a handshake - packets are matched by conv field, so a static // constant gives us a symmetrical P2P setup. const kcpConvID = 0xC0FFEE01 @@ -24,7 +24,7 @@ const ( kcpMTU = 1400 // Receive/send window in segments. Large window allows in-flight bursts - // without stalling — important when one VP8 frame may carry many KCP + // without stalling - important when one VP8 frame may carry many KCP // segments and ACKs trickle back at frame cadence. kcpSndWnd = 4096 kcpRcvWnd = 4096 @@ -99,7 +99,7 @@ func (r *kcpRuntime) readLoop(onData func([]byte)) { continue } if size > kcpMaxMessage { - // Stream framing is now corrupted — there is no safe way to + // Stream framing is now corrupted - there is no safe way to // resync without a session reset. Bail and let the upper layer // reconnect. return diff --git a/internal/transport/vp8channel/kcpconn.go b/internal/transport/vp8channel/kcpconn.go index 106561b..161f9d5 100644 --- a/internal/transport/vp8channel/kcpconn.go +++ b/internal/transport/vp8channel/kcpconn.go @@ -41,7 +41,7 @@ func newKCPConn(out chan<- []byte, inboundCap int) *kcpConn { } // deliver hands an incoming wire payload to the KCP read loop. Drops on -// overflow are intentional — KCP will detect the loss via SACK and retransmit. +// overflow are intentional - KCP will detect the loss via SACK and retransmit. func (c *kcpConn) deliver(payload []byte) { cp := make([]byte, len(payload)) copy(cp, payload)