unsubscribe method
Implementation
void unsubscribe(String channel, Subscription subscription) {
final dead = _channels.unsubscribe(channel, subscription);
if (!dead) return;
connect(callback: () {
_logger.info('Client $_clientId attempting to unsubscribe from $channel');
_sendMessage(
Message(
Channel.unsubscribe,
clientId: _clientId,
subscription: channel,
),
onResponse: (response) {
if (response.successful == false) return;
final _channel = response.subscription;
_logger.info(
'Unsubscription acknowledged for $_clientId from $_channel',
);
},
);
});
}