vert-x3 / vertx-mqtt

Vert.x MQTT
Apache License 2.0
185 stars 88 forks source link

MqttClient.isConnected() returns true after call to MqttClient.disconnect() #151

Closed mhball closed 4 years ago

mhball commented 4 years ago

The following Kotlin snippet prints true.

mqttClient.disconnect {
    if(it.succeeded()) {
        println(mqttClient.isConnected)
}

It seems an intentional disconnect doesn't set the isConnected flag to false.

vietj commented 4 years ago

actually it does but once the TCP connection is closed, I think it should be done before

vietj commented 4 years ago

See https://github.com/vert-x3/vertx-mqtt/pull/179