SwiftMQTT icon indicating copy to clipboard operation
SwiftMQTT copied to clipboard

Socket Error & Disconnect

Open YnotZer0 opened this issue 8 years ago • 1 comments

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 avatar Oct 10 '16 11:10 YnotZer0

@YnotZer0 Were you able to reproduce the issue?

bhargavg avatar Nov 16 '16 10:11 bhargavg