Skip to content

Commit

Permalink
Fix invalid Observe option handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dusanb committed Oct 14, 2020
1 parent efac71c commit f100834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func main() {
opts = append(opts, coapmsg.Option{ID: coapmsg.URIQuery, Value: []byte(fmt.Sprintf("auth=%s", *a))})
}

if o == nil {
if o == nil || (!*o) {
pld := strings.NewReader(*d)

res, err := client.Send(path, code, message.MediaType(*cf), pld, opts...)
Expand Down

0 comments on commit f100834

Please sign in to comment.