public void Dispose() { if (slaveClientLazy != null) { slaveClientLazy.InputProtocol.Transport.Close(); slaveClientLazy = null; } if (masterClientLazy != null) { masterClientLazy.InputProtocol.Transport.Close(); masterClientLazy = null; } }
public void Dispose() { if (slaveClientLazy != null) { slaveClientLazy.InputProtocol.Transport.Close(); slaveClientLazy = null; } if (masterClientLazy != null) { masterClientLazy.InputProtocol.Transport.Close(); masterClientLazy = null; } }
public VMToolMaster.Client GetMasterClient() { CheckProfileHasMaster(); CheckProfileHasVM(); if (masterClientLazy == null) { if (profile.Master == null) { throw new InvalidOperationException("Missing master hostname in profile."); } Log(string.Format("Connecting to master server '{0}:{1}'.", profile.Master, profile.MasterPort)); TTransport transport = OpenTransport(profile.Master, profile.MasterPort); TProtocol protocol = new TBinaryProtocol(transport); masterClientLazy = new VMToolMaster.Client(protocol); } return(masterClientLazy); }
public VMToolMaster.Client GetMasterClient() { CheckProfileHasMaster(); CheckProfileHasVM(); if (masterClientLazy == null) { if (profile.Master == null) throw new InvalidOperationException("Missing master hostname in profile."); Log(string.Format("Connecting to master server '{0}:{1}'.", profile.Master, profile.MasterPort)); TTransport transport = OpenTransport(profile.Master, profile.MasterPort); TProtocol protocol = new TBinaryProtocol(transport); masterClientLazy = new VMToolMaster.Client(protocol); } return masterClientLazy; }