Skip to content

Commit

Permalink
net/rpc: unlock client.mutex as early as possible
Browse files Browse the repository at this point in the history
Although these changes have no essential influence, I think this is a better point.

Change-Id: I571d3a14c948d2fd7bc9561f47f33e9e4c90683f
GitHub-Last-Rev: d8c5d18
GitHub-Pull-Request: #24697
Reviewed-on: https://go-review.googlesource.com/104895
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
chanxuehong authored and bradfitz committed Apr 6, 2018
1 parent 58e3f2a commit 92c29ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/rpc/client.go
Expand Up @@ -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
}
Expand Down

0 comments on commit 92c29ef

Please sign in to comment.