CocoaMQTT
CocoaMQTT copied to clipboard
Can’t connect to mosquitto server via websocket, regular connection works
Not sure what’s going on, but I have a website using the paho-mqtt client over secure websocket. All good. Unfortunately, CocoaMQTT isn’t able to connect, securely or otherwise. No errors, other than what appears to be a timeout after 90s. State changes to connecting, never gets to connected. Connecting directly via MQTT protocol works fine.
What additional info can I give to help get this sorted?
I was having a similar issue implementing websockets. Are you implementing the
func mqtt(_ mqtt: CocoaMQTT, didReceive trust: SecTrust, completionHandler: @escaping (Bool) -> Void)
method of the CocoaMQTTDelegate protocol? Still haven't figured out why, but implementing that method got me connected.