Added promise to the socket connection