move socketPromise.resolve() until handshake message is received
move socketPromise.resolve() until handshake message is received

instead of happening after the socket.onopen event.

wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx