// until here session is encrypted then it depends on the negotiation
// The session initiator decides whether to use SSL.
if (!sslEncryption)
session.stopEncryption();
TopologyMsg inTopoMsg = null;
if (protocolVersion > ProtocolVersion.REPLICATION_PROTOCOL_V1)
{
// Only protocol version above V1 has a phase 2 handshake
// NOW PROCEDE WITH SECOND PHASE OF HANDSHAKE:
// TopologyMsg then TopologyMsg (with a RS)
// wait and process Topo from remote RS
inTopoMsg = waitAndProcessTopoFromRemoteRS();
// send our own TopologyMsg to remote RS
TopologyMsg outTopoMsg = sendTopoToRemoteRS();
// log
logTopoHandshakeRCVandSND(inTopoMsg, outTopoMsg);
}
else