Skip to content

Commit

Permalink
fix(connection): conn nil pointer panic (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
woorui committed Aug 29, 2022
1 parent f6c3c73 commit 5f11635
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/client.go
Expand Up @@ -226,7 +226,10 @@ func (c *Client) Close() error {
return nil
}

c.conn.CloseWithError(yerr.ErrorCodeClientAbort.To(), "client ask to close")
if c.conn != nil {
c.conn.CloseWithError(yerr.ErrorCodeClientAbort.To(), "client ask to close")
}

return c.close()
}

Expand Down

0 comments on commit 5f11635

Please sign in to comment.