Skip to content

Commit

Permalink
rpc-mqtt: Do not double-ACK the message
Browse files Browse the repository at this point in the history
It's done by the MQTT library.

CL: rpc-mqtt: Do not double-ACK the message (it's done by the MQTT library)

PUBLISHED_FROM=8df95a8b987e22a0b606d3c4b1f8d1a892edc441
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Apr 11, 2018
1 parent 7376383 commit bf5da95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mgos_rpc_channel_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ static void mgos_rpc_mqtt_sub_handler(struct mg_connection *nc, int ev,
return;
}
struct mg_mqtt_message *msg = (struct mg_mqtt_message *) ev_data;
if (msg->qos > 0) mg_mqtt_puback(nc, msg->message_id);
char *bare_topic = mgos_rpc_mqtt_topic_name(
mg_mk_str(mgos_sys_config_get_device_id()), false);
size_t bare_topic_len = strlen(bare_topic);
Expand All @@ -82,6 +81,7 @@ static void mgos_rpc_mqtt_sub_handler(struct mg_connection *nc, int ev,
msg->topic.len - bare_topic_len - 1 /* slash */);
ch->ev_handler(ch, MG_RPC_CHANNEL_FRAME_RECD_PARSED, &frame);
}
(void) nc;
}

static void mgos_rpc_mqtt_handler(struct mg_connection *nc, int ev,
Expand Down

0 comments on commit bf5da95

Please sign in to comment.