Skip to content

Commit

Permalink
* NEW [bench] Fix the log in bench when do subscribing.
Browse files Browse the repository at this point in the history
Signed-off-by: wanghaemq <wangwei@emqx.io>
  • Loading branch information
wanghaEMQ authored and JaylinYu committed Oct 25, 2023
1 parent 427189f commit 04db73e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nanomq_cli/bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ sub_cb(void *arg)
nng_mqtt_msg_set_packet_type(msg, NNG_MQTT_SUBSCRIBE);
char *topic = nnb_opt_get_topic(
sub_opt->topic, sub_opt->username, work->msg);
// log_info("topic: %s", topic);
printf("Subscribe topic: %s\n", topic);
nng_mqtt_topic_qos topic_qos[] = {
{ .qos = sub_opt->qos,
.topic = { .buf = (uint8_t *) topic,
Expand Down Expand Up @@ -294,8 +294,7 @@ connect_cb(nng_pipe p, nng_pipe_ev ev, void *arg)
switch (opt_flag) {
case SUB:;
nng_atomic_inc(statistics.acnt);
printf("connected: %d. Topics: [\"%s\"]\n",
nng_atomic_get(statistics.acnt), sub_opt->topic);
printf("connected: %d.\n", nng_atomic_get(statistics.acnt));
break;
case PUB:
nng_atomic_inc(statistics.acnt);
Expand Down

0 comments on commit 04db73e

Please sign in to comment.