Handle case of infinite duration properly in Timeout middleware