Skip to content

Commit f100834

Browse files
author
dusanb
committed
Fix invalid Observe option handling
1 parent efac71c commit f100834

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func main() {
7878
opts = append(opts, coapmsg.Option{ID: coapmsg.URIQuery, Value: []byte(fmt.Sprintf("auth=%s", *a))})
7979
}
8080

81-
if o == nil {
81+
if o == nil || (!*o) {
8282
pld := strings.NewReader(*d)
8383

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

0 commit comments

Comments
 (0)