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
Closed

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

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

Comments

@LiamFry
Copy link

LiamFry 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
Copy link
Contributor

karlp 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
Copy link
Contributor

ralight 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
Copy link
Contributor

ralight commented Sep 25, 2019

This is now fixed in 1.6.7.

@ralight ralight closed this as completed Sep 25, 2019
@LiamFry
Copy link
Author

LiamFry 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!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants