mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
general: optimize code
This commit is contained in:
1 parent
69bbaa809c
commit
d36b8fa394
12 files changed
+65
-59
No files matched your search
@@ -30,7 +30,7 @@ func NewPktConn(c net.PacketConn, writeAddr net.Addr, tgtAddr socks.Addr, tgtHea
|
||||
|
||||
if ctrlConn != nil {
|
||||
go func() {
|
||||
buf := []byte{}
|
||||
buf := make([]byte, 1)
|
||||
for {
|
||||
_, err := ctrlConn.Read(buf)
|
||||
if err, ok := err.(net.Error); ok && err.Timeout() {
|
||||
|
||||
Reference in new issue
Block a user