Skip to content

Commit

Permalink
Merge branch 'wait-for-suback' into 'master'
Browse files Browse the repository at this point in the history
Wait for suback

See merge request GeorgeHahn/Charlotte!5
  • Loading branch information
GeorgeHahn committed Aug 31, 2018
2 parents 25ec794 + dc1ce3f commit 55df81e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Charlotte/MqttRouter.cs
Expand Up @@ -60,7 +60,8 @@ private void MqttMsgReceived(MqttApplicationMessage msg)
}

// TODO: Subscribe QoS customization
_connection.SubscribeAsync(sub, MqttQualityOfService.AtMostOnce);
var suback = _connection.SubscribeAsync(sub, MqttQualityOfService.AtLeastOnce);
suback.Wait();
lock (_handlers)
{
_handlers.Add(new MqttHandler(topic, value));
Expand Down

0 comments on commit 55df81e

Please sign in to comment.