ruby-mqtt
ruby-mqtt copied to clipboard
It is now possible to specify a timeout when opening a TCPSocket.
By specifying as follows, you can now specify the timeout time in seconds when MQTTClient opens a TCPSocket.
client = MQTT::Client.connect(
:host => 'myserver.example.com',
:connect_timeout => 15
)
The default timeout period is 30 seconds.