Porting timeout option from got