diff options
| author | yangwei <[email protected]> | 2024-06-14 19:42:07 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-06-14 19:42:07 +0800 |
| commit | 20b65aef017c25644da73f244168f25587f171b4 (patch) | |
| tree | 11c1ee61ec7faefe0363ad0a7afb1f3141c7dc9c | |
| parent | 6e28b1be1e81cd0b1da40dad869274ad23ddbe15 (diff) | |
🐞 fix(stellar_session_mq_subscribe): fix check dup error when subcribev2.1.2
| -rw-r--r-- | src/plugin_manager/plugin_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugin_manager/plugin_manager.c b/src/plugin_manager/plugin_manager.c index 1480c25..9f9f7bd 100644 --- a/src/plugin_manager/plugin_manager.c +++ b/src/plugin_manager/plugin_manager.c @@ -773,6 +773,8 @@ int stellar_session_mq_subscribe(struct stellar *st, int topic_id, on_session_ms struct stellar_mq_subscriber_info *p=NULL; while( (p=(struct stellar_mq_subscriber_info *)utarray_next(session_plugin_schema->registed_session_mq_subscriber_info,p))) { + if(p->topic_id==topic_id) + { struct stellar_mq_subscriber *tmp_subscriber=topic->subscribers; int cnt=0; while(tmp_subscriber) @@ -785,6 +787,7 @@ int stellar_session_mq_subscribe(struct stellar *st, int topic_id, on_session_ms cnt++; tmp_subscriber=tmp_subscriber->next; } + } }; struct stellar_mq_subscriber *new_subscriber = CALLOC(struct stellar_mq_subscriber,1); |
