Skip to content

Commit

Permalink
More seatbelts
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon Miteff committed Jun 14, 2023
1 parent 43af6c2 commit d01f7cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func (c *Client) RemoteEndpointInfo() (uuid string, version string) {

// Close closes the underlying websocket connection.
func (c *Client) Close() error {
if c == nil {
return errors.New("closing nil client")
}
if c.conn == nil {
return errors.New("connection not open")
}
Expand Down

0 comments on commit d01f7cd

Please sign in to comment.