Skip to content

Commit

Permalink
Fixes sub_count is not decreased when client ubsubscribe
Browse files Browse the repository at this point in the history
Signed-off-by: linkkzz <[email protected]>
  • Loading branch information
linkkzz committed Jun 30, 2023
1 parent 269756a commit 18ea97c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/subs.c
Expand Up @@ -389,6 +389,7 @@ static int sub__remove_normal(struct mosquitto *context, struct mosquitto__subhi
if(context->subs[i] && context->subs[i]->hier == subhier){
mosquitto__free(context->subs[i]);
context->subs[i] = NULL;
context->sub_count--;
break;
}
}
Expand Down Expand Up @@ -429,6 +430,7 @@ static int sub__remove_shared(struct mosquitto *context, struct mosquitto__subhi

mosquitto__free(context->subs[i]);
context->subs[i] = NULL;
context->sub_count--;
break;
}
}
Expand Down

0 comments on commit 18ea97c

Please sign in to comment.