diff --git a/lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java b/lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java index ffb33d426..34098ea0b 100644 --- a/lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java +++ b/lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java @@ -206,6 +206,7 @@ public Channel get(final String channelName, final ChannelOptions channelOptions public void release(String channelName) { Channel channel = map.remove(channelName); if(channel != null) { + channel.markAsReleased(); try { channel.detach(); } catch (AblyException e) { diff --git a/lib/src/main/java/io/ably/lib/realtime/ChannelBase.java b/lib/src/main/java/io/ably/lib/realtime/ChannelBase.java index 1da00e9ba..326e773f1 100644 --- a/lib/src/main/java/io/ably/lib/realtime/ChannelBase.java +++ b/lib/src/main/java/io/ably/lib/realtime/ChannelBase.java @@ -83,6 +83,13 @@ public abstract class ChannelBase extends EventEmitter