lib/slack/real_time/concurrency/celluloid.rb in slack-ruby-client-0.8.1 vs lib/slack/real_time/concurrency/celluloid.rb in slack-ruby-client-0.9.0

- old
+ new

@@ -36,11 +36,11 @@ loop { read } if socket rescue EOFError => e logger.debug("#{self.class}##{__method__}") { e } driver.emit(:close, WebSocket::Driver::CloseEvent.new(1001, 'server closed connection')) unless @closing ensure - current_actor.terminate if current_actor.alive? && current_actor.running? + current_actor.terminate if current_actor.alive? rescue nil end def close @closing = true driver.close @@ -88,11 +88,11 @@ @future.value end end def build_socket - socket = TCPSocket.new(addr, port) - socket = SSLSocket.new(socket, build_ssl_context) if secure? + socket = ::Celluloid::IO::TCPSocket.new(addr, port) + socket = ::Celluloid::IO::SSLSocket.new(socket, build_ssl_context) if secure? socket end def build_ssl_context OpenSSL::SSL::SSLContext.new(:TLSv1_2_client)