Skip to content

Commit

Permalink
Add a nil guard
Browse files Browse the repository at this point in the history
  • Loading branch information
angrycub committed Sep 7, 2022
1 parent eb6a261 commit 44baeb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,9 @@ func (c *Client) updateNodeStatus() error {
// Check heartbeat response for information about the server-side scheduling
// state of this node
c.UpdateConfig(func(c *config.Config) {
c.Node.SchedulingEligibility = resp.ClientStatus.SchedulingEligibility
if resp.ClientStatus != nil {
c.Node.SchedulingEligibility = resp.ClientStatus.SchedulingEligibility
}
})

// Update the number of nodes in the cluster so we can adjust our server
Expand Down

0 comments on commit 44baeb1

Please sign in to comment.