Skip to content

Commit

Permalink
Getting channel serial only when channel state is attached for recove…
Browse files Browse the repository at this point in the history
…ry key
  • Loading branch information
sacOO7 committed Jan 23, 2024
1 parent 4d68663 commit cf567ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/main/java/io/ably/lib/realtime/AblyRealtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ protected void setChannelSerialsFromRecoverOption(Map<String, String> serials) {
protected Map<String, String> getChannelSerials() {
Map<String, String> channelSerials = new HashMap<>();
for (Channel channel : this.channels.values()) {
channelSerials.put(channel.name, channel.properties.channelSerial);
if (channel.state == ChannelState.attached) {
channelSerials.put(channel.name, channel.properties.channelSerial);
}
}
return channelSerials;
}
Expand Down

0 comments on commit cf567ec

Please sign in to comment.