net/rpc: fix race condition when request write partially fails
net/rpc: fix race condition when request write partially fails

When client fails to write a request is sends caller that error,
however server might have failed to read that request in the mean
time and replied with that error. When client then reads the
response the call would no longer be pending, so call will be nil

Handle this gracefully by discarding such server responses

R=golang-dev, r
CC=golang-dev, rsc
http://codereview.appspot.com/5956051

Committer: Rob Pike <4dc7c9ec434ed06502767136789763ec11d2c4b7@golang.org>

tv42/old-go,pombredanne/go-deleteme,tv42/old-go,dsriram/golang,pombredanne/go-deleteme,pombredanne/go-deleteme,apparentlymart/golang,apparentlymart/golang,apparentlymart/golang,pombredanne/go-deleteme,gnanderson/go,dsriram/golang,tv42/old-go,dsriram/golang,tv42/old-go,tv42/old-go,gnanderson/go,apparentlymart/golang,tv42/old-go,gnanderson/go,dsriram/golang,tv42/old-go,apparentlymart/golang,dsriram/golang,apparentlymart/golang,dsriram/golang,gnanderson/go,dsriram/golang,apparentlymart/golang,gnanderson/go,pombredanne/go-deleteme,pombredanne/go-deleteme,pombredanne/go-deleteme,gnanderson/go,gnanderson/go