lib/remcached.rb in astro-remcached-0.2.1 vs lib/remcached.rb in astro-remcached-0.2.2
- old
+ new
@@ -3,15 +3,18 @@
require 'remcached/client'
module Memcached
class << self
##
- # +servers+: either Array of host:port strings or Hash of
- # host:port => weight integers
+ # +servers+: Array of host:port strings
def servers=(servers)
if defined?(@clients) && @clients
while client = @clients.shift
- client.close
+ begin
+ client.close
+ rescue Exception
+ # This is allowed to fail silently
+ end
end
end
@clients = servers.collect { |server|
host, port = server.split(':')