1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:44:40 -07:00

net: fix race in TestReadWriteDeadline.

Discovered by adding OBLOCK support to race
instrumentation.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6819067
This commit is contained in:
Rémy Oudompheng 2012-11-01 20:52:30 +01:00
parent 27c990e794
commit 824b332652

View File

@ -201,7 +201,7 @@ func TestReadWriteDeadline(t *testing.T) {
go func() { go func() {
var buf [10]byte var buf [10]byte
_, err = c.Read(buf[:]) _, err := c.Read(buf[:])
if err == nil { if err == nil {
t.Errorf("Read should not succeed") t.Errorf("Read should not succeed")
} }
@ -212,7 +212,7 @@ func TestReadWriteDeadline(t *testing.T) {
go func() { go func() {
var buf [10000]byte var buf [10000]byte
for { for {
_, err = c.Write(buf[:]) _, err := c.Write(buf[:])
if err != nil { if err != nil {
break break
} }