jsierles-memcache-client 1.5.0.5 → 1.5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/memcache.rb +9 -2
- metadata +1 -1
data/lib/memcache.rb
CHANGED
@@ -18,7 +18,7 @@ class MemCache
|
|
18
18
|
##
|
19
19
|
# The version of MemCache you are using.
|
20
20
|
|
21
|
-
VERSION = '1.5.0.
|
21
|
+
VERSION = '1.5.0.6'
|
22
22
|
|
23
23
|
##
|
24
24
|
# Default options for the cache object.
|
@@ -661,6 +661,13 @@ class MemCache
|
|
661
661
|
|
662
662
|
CONNECT_TIMEOUT = 0.25
|
663
663
|
|
664
|
+
##
|
665
|
+
# The amount of time to wait for a response from a memcached server.
|
666
|
+
# If a response isn't received within this time limit,
|
667
|
+
# the server will be marked as down.
|
668
|
+
|
669
|
+
SOCKET_TIMEOUT = 0.25
|
670
|
+
|
664
671
|
##
|
665
672
|
# The amount of time to wait before attempting to re-establish a
|
666
673
|
# connection with a server that is marked dead.
|
@@ -801,7 +808,7 @@ class TCPTimeoutSocket
|
|
801
808
|
def initialize(*args)
|
802
809
|
Timeout::timeout(MemCache::Server::CONNECT_TIMEOUT, SocketError) do
|
803
810
|
@sock = TCPSocket.new(*args)
|
804
|
-
@len =
|
811
|
+
@len = MemCache::Server::SOCKET_TIMEOUT
|
805
812
|
end
|
806
813
|
end
|
807
814
|
|