[patch] fix timeout==0
Gaal Yahas
gaal at forum2.org
Tue Mar 29 03:55:50 PST 2005
_connect_sock never works in blocking mode because of a bug in setting
the default timeout. Here's the fix.
==snip==
--- /home/roo/.cpan/build/Cache-Memcached-1.14/Memcached.pm-o 2005-03-29 13:48:39.917957408 +0200
+++ /home/roo/.cpan/build/Cache-Memcached-1.14/Memcached.pm 2005-03-29 13:49:26.747838184 +0200
@@ -157,7 +157,7 @@
sub _connect_sock { # sock, sin, timeout
my ($sock, $sin, $timeout) = @_;
- $timeout ||= 0.25;
+ $timeout = 0.25 if not defined $timeout;
# make the socket non-blocking from now on,
# except if someone wants 0 timeout, meaning
==snip==
--
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
More information about the memcached
mailing list