Timeout of 5 seconds for all sockets.
minor changes.