jakiestfu / himawari.js

Download real-time images of Earth from the Himawari-8 satellite
http://jakiestfu.github.io/himawari.js/demo/
MIT License
1.81k stars 103 forks source link

add timeout to latest.json request #18

Closed ungoldman closed 8 years ago

ungoldman commented 8 years ago

Calls to latest.json have been timing out for me a lot lately. This PR adds a timeout to the request and modifies the resolveDate function signature to provide an opportunity to catch the error.

ungoldman commented 8 years ago

Might be worth exposing timeout as an option in the future, as 30 seconds is pretty high.