Handling invalid client handshake