shodan-python icon indicating copy to clipboard operation
shodan-python copied to clipboard

Added timeout to session requests

Open d0lb33 opened this issue 3 years ago • 2 comments

I've been having issues lately with shodan.count with the python client. It seems to hang at this get request. I went ahead and gave the get request a timeout of 1, while allowing retries up to five times. This works for me, if there is a better way please feel free to let me know!

Most of the time, it simply needs one retry. I played with the timeout time, and anything above1 takes way to long, 1 seemed to be the best.

d0lb33 avatar Feb 25 '22 03:02 d0lb33

Fixes #167

d0lb33 avatar Feb 25 '22 03:02 d0lb33

I should note this is after consecutively running a program I am writing that calls this count method.

d0lb33 avatar Feb 25 '22 03:02 d0lb33