fix: state

This commit is contained in:
zarazaex69
2026-05-03 11:50:04 +03:00
parent 23535288cf
commit 3c816a38e8
4 changed files with 7 additions and 7 deletions

View File

@@ -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()

View File

@@ -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
}

View File

@@ -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

View File

@@ -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)