Skip to content

Commit

Permalink
Close socket connection, only if it exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
spilin committed Sep 21, 2023
1 parent a4b7ec5 commit c5e29e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions standaloneproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 136,9 @@ func newRPCClient(network string, address string, timeout time.Duration) (*rpcCl
}

func (rc *rpcClient) Close() error {
if rc.conn == nil {
return nil
}
return rc.conn.Close()
}

Expand Down

0 comments on commit c5e29e5

Please sign in to comment.