Skip to content

Commit 92c29ef

Browse files
chanxuehongbradfitz
authored andcommitted
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: d8c5d18 GitHub-Pull-Request: #24697 Reviewed-on: https://go-review.googlesource.com/104895 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 58e3f2a commit 92c29ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/rpc/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func (client *Client) send(call *Call) {
7575
// Register this call.
7676
client.mutex.Lock()
7777
if client.shutdown || client.closing {
78-
call.Error = ErrShutdown
7978
client.mutex.Unlock()
79+
call.Error = ErrShutdown
8080
call.done()
8181
return
8282
}

0 commit comments

Comments
 (0)