simps / mqtt

🕹 MQTT Protocol Analysis and Coroutine Client for PHP. Support for 3.1, 3.1.1 and 5.0 versions of the MQTT protocol.
https://mqtt.simps.io
Apache License 2.0
358 stars 58 forks source link

[QUESTION]send方法中response默认值为true,当用协程去处理recv消息时会跟simps中的协程冲突导致报错 #91

Closed summers8 closed 1 year ago

summers8 commented 1 year ago

Fatal error: Uncaught Swoole\Error: Socket#8 has already been bound to another coroutine#2, reading of the same socket in coroutine#1 at the same time is not allowed in /www/swooleroot/admin-api/vendor/simps/mqtt/src/Client.php:242 使用的simps版本为:V1.4.2 image

sy-records commented 1 year ago

可以配合 https://github.com/hyperf/multiplex 增加channel使用