aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/http/netconn_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/http/netconn_test.go b/src/net/http/netconn_test.go
index 52b8069f8b..c5fd61289f 100644
--- a/src/net/http/netconn_test.go
+++ b/src/net/http/netconn_test.go
@@ -180,9 +180,10 @@ func (c *fakeNetConn) Close() error {
c.loc.unlock()
// Remote half of the connection reads EOF after reading any remaining data.
c.rem.lock()
- if c.rem.readErr != nil {
+ if c.rem.readErr == nil {
c.rem.readErr = io.EOF
}
+ c.rem.writeErr = net.ErrClosed
c.rem.unlock()
if c.autoWait {
synctest.Wait()