mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-02-20 23:47:21 -05:00
output error
This commit is contained in:
parent
a49816ae46
commit
27009786e9
@ -41,7 +41,10 @@ func readFrom(conn net.Conn, timeout time.Duration, length int) []byte {
|
|||||||
b := make([]byte, length)
|
b := make([]byte, length)
|
||||||
deadline := time.Now().Add(timeout)
|
deadline := time.Now().Add(timeout)
|
||||||
conn.SetReadDeadline(deadline)
|
conn.SetReadDeadline(deadline)
|
||||||
n, _ := io.ReadFull(conn, b[:length])
|
n, err := io.ReadFull(conn, b[:length])
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Unexpected error from readFrom:", err)
|
||||||
|
}
|
||||||
return b[:n]
|
return b[:n]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user