general: optimize codes

This commit is contained in:
nadoo committed 2020-08-10 18:43:41 +08:00
1 parent 3c509f8b7a
commit 8f661a67a4
15 files changed
+35 -37

No files matched your search

+1 -1
View File
@@ -221,7 +221,7 @@ func (c *Client) exchangeUDP(rc net.Conn, reqBytes []byte) ([]byte, error) {
return nil, err
}
respBytes := make([]byte, 2+UDPMaxLen)
respBytes := make([]byte, UDPMaxLen)
n, err := rc.Read(respBytes[2:])
if err != nil {
return nil, err