public void UnRegister(string channel) { if (mChannels.TryRemove(channel, out ChannelRegister type)) { Commands.UNSUBSCRIBE cmd = new Commands.UNSUBSCRIBE(channel); subscribeRequest?.SendCommmand(cmd); } }
public void Dispose() { if (System.Threading.Interlocked.CompareExchange(ref mDisposed, 1, 0) == 0) { Commands.UNSUBSCRIBE cmd = new Commands.UNSUBSCRIBE(null); subscribeRequest?.SendCommmand(cmd); } }