Skip to content

Commit 1536ec1

Browse files
refactor: add comments
1 parent 8f039fc commit 1536ec1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

services/mqtt/client/pubsub.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ func registerHandler(ctx context.Context, handler courier.MessageHandler) func(c
109109

110110
// Start begins the MQTT client operation.
111111
func (m *MqttPubSubClient) Start() error {
112+
//start the consul resolver on the separate go routine to provide
113+
//the MQTT broker address on a channel
112114
go m.resolver.Start()
115+
//client will be blocked from start until it
116+
//receives the address from the resolver or time out happens.
113117
if err := m.client.Start(); err != nil {
114118
metrics.Increment(
115119
"mqtt_error",

0 commit comments

Comments
 (0)