1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 09:36:34 -05:00

output error

This commit is contained in:
Darien Raymond 2017-04-04 00:17:29 +02:00
parent a49816ae46
commit 27009786e9
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -41,7 +41,10 @@ func readFrom(conn net.Conn, timeout time.Duration, length int) []byte {
b := make([]byte, length)
deadline := time.Now().Add(timeout)
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]
}