SwiftMQTT
SwiftMQTT copied to clipboard
Socket Error & Disconnect
I'm using iOS10, XCode 8 and Swift 3 and the SwiftMQTTExample project code and it upgrades the following code from: func mqttSession(session: MQTTSession, received message: Data, in topic: String) { let string = String(data: message, encoding: .utf8)! appendStringToTextView("data received on topic (topic) message (string)") }
to: func mqttDidReceive(message data: Data, in topic: String, from session: MQTTSession) { let string = String(data: message, encoding: .utf8)! appendStringToTextView("data received on topic (topic) message (string)") }
I receive the MQTT message perfectly fine, but, I then get a Socket Error and a Disconnect every time. Is there something that can be tested/fixed?
@YnotZer0 Were you able to reproduce the issue?