mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-01-31 15:53:10 +08:00
Fix panic when when nuclei server is shutdown (#3139)
This commit is contained in:
committed by
GitHub
parent
a6a26ec026
commit
eabd4954cf
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user