Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Fix nil reference panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baliedge committed Sep 29, 2023
1 parent 873e541 commit 66e8943
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gubernator.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,5 +765,8 @@ func countError(err error, defaultType string) {
}

func isDeadlineExceeded(err error) bool {
return errors.As(err, context.DeadlineExceeded)
if err == nil {
return false
}
return errors.Is(err, context.DeadlineExceeded)
}

0 comments on commit 66e8943

Please sign in to comment.