eclipse / paho.golang

Go libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SubOptions (NoLocal,RetainAsPublished) always get false.

BANice opened this issue · comments

Describe the bug

// it expect equal 0x04 not 0x01	
 s.NoLocal = (b & 1 << 2) == 1

To reproduce
make a client and sub topic with (NoLocal,RetainAsPublished) =true. Unpack function will always get false.

Debug output
Any debugging output provided by the client code while reproducing the bug (either embedded to link to the output)

Expected behaviour

I will PR it late.

I've found and fixed a few variations of this in the large change I'm working on. For reference the approach I've used is b&(1<<2) != 0.

great. Thanks.

Had not fixed this specific issue yet (that was the approach Ive used for other flags). Reopened this to ensure it's not forgotten.