oscarpilote / Ortho4XP

A scenery generator for the X-Plane flight simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the best way to add delay between http requests?

kunajk opened this issue · comments

Hello, Im trying to add source, that demands small delays between requests. Wherere is best place to put sleep command?

There used to be such an option, but it got deprecated when downloads were multi-threaded. Do you really need a timer between two consecutive http requests or just some kind of bandwidth limit ? (the latter could be added, the former probably not)

commented

@kunajk, sorry in advance, but until today most of the time I saw a pause/sleep/... the reason was bad code.
Maybe you could give me a hint so that I may understand what you try to do - and maybe can come up with an alternative...

commented

@anthraxn8b Hey, no problem. I want to add sleep between http request because without it server bans my IP