Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mosquitto_subscribe() does not work in V1.6.6 #1422

Closed
LiamFry opened this issue Sep 23, 2019 · 4 comments

Comments

@LiamFry
Copy link

commented Sep 23, 2019

Simple publish (as p.c) and subscribe (as s.c) programs (in C). The publisher works fine. The subscriber seems to never subscribe. The mosqOnSubscribe() callback is never called and incoming messages are never delivered to mosqOnMessage().
I added some delays (usleep()) bc. I wasn't sure if it were a timing issue. (It's not.)

Simply compile as gcc -o p p.c -lmosquitto etc.

I noticed the provided mosquitto_sub command line utility uses mosquitto_subscribe_v5() -- see my earlier issue about 'where are the V5 docs.'

Archive.zip

@karlp

This comment has been minimized.

Copy link
Contributor

commented Sep 23, 2019

this uses loop_start, so possibly seeing the same issue as #1415 and #1385

ralight added a commit that referenced this issue Sep 24, 2019
Closes #1415 and #1422. Thanks to Karl Palsson, Till Zimmermann and Liam Fry.
@ralight

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2019

If you are able to try out the fixes branch and report back I would appreciate it.

git clone https://github.com/eclipse/mosquitto
cd mosquitto
git checkout fixes
make
@ralight ralight added this to the 1.6.7 milestone Sep 24, 2019
@ralight

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2019

This is now fixed in 1.6.7.

@ralight ralight closed this Sep 25, 2019
@LiamFry

This comment has been minimized.

Copy link
Author

commented Oct 10, 2019

Apologies; I'm late to comment. I've been beating the crap out of my application [with 1.6.7] and all is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.