Added timeout to httpclinet (thanks to Pascal Heijnsdijk)