mirror of
https://github.com/zhigang1992/cow.git
synced 2026-01-12 22:46:29 +08:00
Use io.ReadFull to read socks ver/method selection reply.
This commit is contained in:
@@ -201,7 +201,7 @@ func (sp socksParent) connect(url *URL) (cn conn, err error) {
|
||||
|
||||
// version/method selection
|
||||
repBuf := make([]byte, 2)
|
||||
_, err = c.Read(repBuf)
|
||||
_, err = io.ReadFull(c, repBuf)
|
||||
if err != nil {
|
||||
errl.Printf("read ver/method selection error %v\n", err)
|
||||
hasErr = true
|
||||
|
||||
Reference in New Issue
Block a user