lib/ruby_skynet/connection.rb in ruby_skynet-0.5.0 vs lib/ruby_skynet/connection.rb in ruby_skynet-0.6.0

- old
+ new

@@ -3,11 +3,11 @@ require 'thread_safe' require 'resilient_socket' require 'sync_attr' # -# RubySkynet Connection +# RubySkynet Client Connection # # Handles connecting to Skynet Servers as a host:port pair # module RubySkynet class Connection @@ -235,10 +235,10 @@ pool = GenePool.new(pool_config) do new(server, params) end # Cleanup corresponding connection pool when a server terminates - Registry.on_server_removed(server) do + RubySkynet.services.on_server_removed(server) do pool = @@connection_pools.delete(server) # Cannot close all the connections since they could still be in use pool.remove_idle(0) if pool #pool.close if pool logger.debug "Connection pool for server:#{server} has been released"