Skip to content

Commit

Permalink
Fix MQTT error and add error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Azuki-bar committed Nov 21, 2023
1 parent e7a1db4 commit 0f6e1e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/state-manager/pkg/mqtt_handler/mqtt_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func NewHandler(clientOpts *mqtt.ClientOptions, dbHandler *db.DBHandler) (*Handl

if token := cc.Connect(); token.Wait() && token.Error() != nil {
return nil, fmt.Errorf("mqtt error: %w", token.Error())
return nil, fmt.Errorf("mqtt error: %w", token.Error())
}
return &Handler{client: cc, dbHandler: dbHandler}, nil
}
Expand Down

0 comments on commit 0f6e1e4

Please sign in to comment.