Added timeout to tcp requests