Block waiting for correct handshake message