Added time out for sockets