Added a 5000ms timeout to socket connections.