Added a timeout to connections