eclipse-paho / paho.mqtt.ruby

Eclipse Public License 1.0
34 stars 8 forks source link

Can't connect with keep_alive option #11

Closed tomasdelima closed 5 years ago

tomasdelima commented 5 years ago

Hi

I'm trying to connect to a Mosquitto server. When I don't pass the keep_alive parameter, the connection is established. But when I pass this parameter, I receive a PahoMqtt::WritingException:

client.connect(ENV["MQTT_HOST"], 1883, client.keep_alive, true, client.blocking)
Traceback (most recent call last):
        1: from (irb):114
PahoMqtt::WritingException ()

Is this a bug or a configuration problem?

tomasdelima commented 5 years ago

I am sorry, the keep_alive is a number, representing the time to test connection to the server. Passing a boolean raises the expected error