Add global timeout of 5 seconds to sockets.