Skip to content

Commit

Permalink
msg.ctrl could be null if connection is already established
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Aug 13, 2022
1 parent 6321fe7 commit a7cc621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinodesdk/src/main/java/co/tinode/tinodesdk/Topic.java
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ public PromisedReply<ServerMessage> subscribe(MsgSetMeta<DP, DR> set, MsgGetMeta
new PromisedReply.SuccessListener<ServerMessage>() {
@Override
public PromisedReply<ServerMessage> onSuccess(ServerMessage msg) {
if (msg.ctrl.code >= 300) {
if (msg.ctrl == null || msg.ctrl.code >= 300) {
// 3XX response: already subscribed.
mAttached = true;
return null;
Expand Down

0 comments on commit a7cc621

Please sign in to comment.