lib/automate-em/device/tcp_control.rb in automate-em-0.0.2 vs lib/automate-em/device/tcp_control.rb in automate-em-0.0.3
- old
+ new
@@ -49,13 +49,11 @@
end
if !@tls_enabled
@connected = true
@connecting = false
- EM.defer do
- call_connected
- end
+ call_connected
else
if !@parent.respond_to?(:certificates)
start_tls
else
begin
@@ -76,12 +74,10 @@
end
def ssl_handshake_completed
@connected = true
@connecting = false
- EM.defer do
- call_connected(get_peer_cert) # this will mark the true connection complete stage for encrypted devices
- end
+ call_connected(get_peer_cert) # this will mark the true connection complete stage for encrypted devices
end
def unbind
@connected = false # set offline
\ No newline at end of file