Skip to content

Commit

Permalink
fix: set CleanSession to false
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanleo committed Jan 6, 2020
1 parent 05f17db commit 61ffe78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/hc-motion-sensor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func connect(clientID string, uri *url.URL) (mqtt.Client, error) {
password, _ := uri.User.Password()
opts.SetPassword(password)
opts.SetClientID(clientID)
opts.SetCleanSession(false)

var client = mqtt.NewClient(opts)
var token = client.Connect()
Expand Down

0 comments on commit 61ffe78

Please sign in to comment.