Skip to content

Commit

Permalink
Fix panic when when nuclei server is shutdown (projectdiscovery#3139)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdk2588 authored Jan 3, 2023
1 parent a6a26ec commit eabd495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/internal/runner/nucleicloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
// HTTPErrorRetryPolicy is to retry for HTTPCodes >= 500.
func HTTPErrorRetryPolicy() func(ctx context.Context, resp *http.Response, err error) (bool, error) {
return func(ctx context.Context, resp *http.Response, err error) (bool, error) {
if resp.StatusCode >= http.StatusInternalServerError {
if resp != nil && resp.StatusCode >= http.StatusInternalServerError {
return true, errors.New(resp.Status)
}
return retryablehttp.CheckRecoverableErrors(ctx, resp, err)
Expand Down

0 comments on commit eabd495

Please sign in to comment.