Skip to content

Commit

Permalink
net/rpc: Add documentation for client.Close
Browse files Browse the repository at this point in the history
Fixes #16678

Change-Id: I48c2825d4fef55a75d2f99640a7079c56fce39db
Reviewed-on: https://go-review.googlesource.com/28370
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
SamWhited authored and bradfitz committed Sep 25, 2016
1 parent 6ba5b32 commit 5df7f52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net/rpc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ func Dial(network, address string) (*Client, error) {
return NewClient(conn), nil
}

// Close calls the underlying codec's Close method. If the connection is already
// shutting down, ErrShutdown is returned.
func (client *Client) Close() error {
client.mutex.Lock()
if client.closing {
Expand Down

0 comments on commit 5df7f52

Please sign in to comment.