Răsfoiți Sursa

The MQTT::Client#connect automatically calls #disconnect when a block is given.

Akinori MUSHA 10 ani în urmă
părinte
comite
fd991f7eb5
1 a modificat fișierele cu 0 adăugiri și 4 ștergeri
  1. 0 4
      app/models/agents/mqtt_agent.rb

+ 0 - 4
app/models/agents/mqtt_agent.rb

@@ -110,8 +110,6 @@ module Agents
         incoming_events.each do |event|
         incoming_events.each do |event|
           c.publish(interpolated(event)['topic'], event)
           c.publish(interpolated(event)['topic'], event)
         end
         end
-
-        c.disconnect
       end
       end
     end
     end
 
 
@@ -134,8 +132,6 @@ module Agents
           }
           }
         rescue Timeout::Error
         rescue Timeout::Error
         end
         end
-
-        c.disconnect   
       end
       end
     end
     end