emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.59k stars 418 forks source link

Schedule read when connecting to websocket #408

Closed mm512 closed 2 years ago

mm512 commented 2 years ago

There is a problem with reconnecting to the server using websockets.

How to reproduce the issue:

I think scheduleRead method should be called just after establishing a web socket connection. Then we can receive errors like "no internet connection". Calling scheduleRead in didOpenWithProtocol is too late for those initial errors.

leeway1208 commented 2 years ago

good!