CocoaMQTT icon indicating copy to clipboard operation
CocoaMQTT copied to clipboard

CocoaMQTT state is always contecting

Open renjunok opened this issue 4 years ago • 4 comments

let clientID = "CocoaMQTT-" + String(ProcessInfo().processIdentifier) let mqtt = CocoaMQTT(clientID: clientID, host: "192.168.1.10", port: 1883) mqtt.logLevel = .debug mqtt.username = "test" mqtt.password = "public" mqtt.willMessage = CocoaMQTTWill(topic: "/will", message: "dieout") mqtt.keepAlive = 60 mqtt.delegate = self mqtt.connect()

func mqtt(_ mqtt: CocoaMQTT, didStateChangeTo state: CocoaMQTTConnState) { print("current state is: (state)") }

state is always contecting Use golang client to connect normally xcode 12.3, swift5.3

renjunok avatar Nov 29 '20 18:11 renjunok

I have the same problem.

Version 12.4 ,swift5.3.2

WPHU-nuvoton avatar Feb 23 '21 02:02 WPHU-nuvoton

I have the same problem.

Pikdays avatar Jul 19 '21 10:07 Pikdays

Same problem here

fhainz avatar Sep 20 '21 17:09 fhainz

Please check the broker configuration again. Maybe the problem can be solved. Or you can use free broker(broker-cn.emqx.io port:1883) to test.

leeway1208 avatar Sep 21 '21 04:09 leeway1208