socks5: fixed a bug in ReadFrom

This commit is contained in:
nadoo committed 2018-01-22 00:51:28 +08:00
1 parent 0d9f588e1f
commit 24d30cdca7
1 file changed
+1 -1
+1 -1
View File
@@ -644,7 +644,7 @@ func (pc *Socks5PktConn) ReadFrom(b []byte) (int, net.Addr, error) {
pc.tgtAddr = tgtAddr
}
return n - len(tgtAddr), raddr, err
return n - len(tgtAddr) - 3, raddr, err
}
// WriteTo overrides the original function from net.PacketConn