Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket Error & Disconnect #11

Open
YnotZer0 opened this issue Oct 10, 2016 · 1 comment
Open

Socket Error & Disconnect #11

YnotZer0 opened this issue Oct 10, 2016 · 1 comment

Comments

@YnotZer0
Copy link

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?

@bhargavg
Copy link
Collaborator

@YnotZer0 Were you able to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants