Commit 92c29ef9 authored by chanxuehong's avatar chanxuehong Committed by Brad Fitzpatrick

net/rpc: unlock client.mutex as early as possible

Although these changes have no essential influence, I think this is a better point.

Change-Id: I571d3a14c948d2fd7bc9561f47f33e9e4c90683f
GitHub-Last-Rev: d8c5d180069bb91b6eb1247769bd14f728922fc0
GitHub-Pull-Request: golang/go#24697
Reviewed-on: https://go-review.googlesource.com/104895Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 58e3f2ac
......@@ -75,8 +75,8 @@ func (client *Client) send(call *Call) {
// Register this call.
client.mutex.Lock()
if client.shutdown || client.closing {
call.Error = ErrShutdown
client.mutex.Unlock()
call.Error = ErrShutdown
call.done()
return
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment