Darien Raymond 8 anni fa
parent
commit
27009786e9
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      testing/scenarios/common.go

+ 4 - 1
testing/scenarios/common.go

@@ -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]
 }