格式化代码

This commit is contained in:
huangxiaolei
2022-12-19 13:40:04 +08:00
parent f773ba8df7
commit 58b2df2bc6
92 changed files with 682 additions and 626 deletions

View File

@@ -6,11 +6,12 @@ package kcp
import (
"bytes"
"encoding/binary"
"net"
"os"
"github.com/pkg/errors"
"golang.org/x/net/ipv4"
"golang.org/x/net/ipv6"
"net"
"os"
)
// the read loop for a client session
@@ -37,8 +38,8 @@ func (s *UDPSession) readLoop() {
if src == "" { // set source address if nil
src = msg.Addr.String()
} else if msg.Addr.String() != src {
//atomic.AddUint64(&DefaultSnmp.InErrs, 1)
//continue
// atomic.AddUint64(&DefaultSnmp.InErrs, 1)
// continue
s.remote = msg.Addr
src = msg.Addr.String()
}