[memcached] bradfitz, r302: clear ON_ITEM on failure too
commits at code.sixapart.com
commits at code.sixapart.com
Mon Jul 17 21:24:31 UTC 2006
clear ON_ITEM on failure too
U trunk/api/perl/lib/Cache/Memcached/GetParser.pm
Modified: trunk/api/perl/lib/Cache/Memcached/GetParser.pm
===================================================================
--- trunk/api/perl/lib/Cache/Memcached/GetParser.pm 2006-07-17 21:02:22 UTC (rev 301)
+++ trunk/api/perl/lib/Cache/Memcached/GetParser.pm 2006-07-17 21:24:31 UTC (rev 302)
@@ -40,6 +40,7 @@
if !defined($res) and $!==EWOULDBLOCK;
if ($res == 0) { # catches 0=conn closed or undef=error
+ $self->[ON_ITEM] = undef;
return -1;
}
@@ -59,7 +60,10 @@
2048, $self->[OFFSET]);
return 0
if !defined($res) and $!==EWOULDBLOCK;
- return -1 if $res == 0;
+ if ($res == 0) {
+ $self->[ON_ITEM] = undef;
+ return -1;
+ }
$self->[OFFSET] += $res;
More information about the memcached-commits
mailing list