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

epoll版本的server无法正常工作 #1

Open
Wand3ring opened this issue Oct 9, 2021 · 0 comments
Open

epoll版本的server无法正常工作 #1

Wand3ring opened this issue Oct 9, 2021 · 0 comments

Comments

@Wand3ring
Copy link

Hi!
感谢作者开源!作为C语言初学者阅读您的源码受益匪浅!

我使用的是epoll版本的server,我发现客户端发送消息后,另一个订阅相同主题的客户端无法获取该主题下的消息。

查阅了源码,发现是 void mqtt_do_publish_msg(const uint8 *buf, int sockfd)中并没有根据主题寻找对应的文件描述符(look_up_by_sokfd只是根据传入的sockfd寻找链表中对应的socket_record)。

针对这个问题,不知您是否有想过解决思路,希望与您探讨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant