Fix an inverted test in fakeNetConn.Close that caused closing
a connection to not break the other half of the connection.
Change-Id: I4e53f78402f8e503c749d57f294a4524abdccfb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/722220
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
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()