novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 465 forks source link

Session not initializing when using legacy API #435

Closed benstadin closed 6 years ago

benstadin commented 6 years ago

Hi,

the session cannot be initiated for me when trying to use the old API with username and client id params:

_session = [[MQTTSession alloc] initWithClientId:_mqttUser userName:_mqttUser password:_mqttPassword keepAlive:3000 cleanSession:true willTopic:nil willMsg:nil willQoS:MQTTQosLevelAtMostOnce willRetainFlag:false];

I use emqtt here, but I can reproduce the issue with the publich HiveMQ test server:

ClientId: ben123 userName: ben Host: broker.hivemq.com Port: 1883

The connection is just dropped, with no trace of what went wrong:

"Failed to connect to MQTT Server. Server has closed connection without connack."

Regards Ben

jcavar commented 6 years ago

Sorry @benstadin for late reply, do you still have this issue?

jcavar commented 6 years ago

I will close this due to inactivity. Feel free to reopen this if you have any more info.