Changeset 805
- Timestamp:
- 01/13/09 03:23:26 (10 months ago)
- Location:
- trunk/api/perl
- Files:
-
- 1 added
- 2 modified
-
ChangeLog (modified) (1 diff)
-
lib/Cache/Memcached.pm (modified) (4 diffs)
-
t/05_reconnect_timeout.t (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/api/perl/ChangeLog
r798 r805 1 * Reconnects to a dead connection shouldn't happen every time when the 2 connection has never succeded. Apply the dead timeout to sockets that 3 never even came up. Add a test. 4 1 5 * Warn when trying to put undef values into memcache. 2 6 (Henry Lyne <hlyne@livejournalinc.com>) -
trunk/api/perl/lib/Cache/Memcached.pm
r797 r805 245 245 if ($self && $self->{pref_ip}{$ip}) { 246 246 socket($sock, PF_INET, SOCK_STREAM, $proto); 247 $sock_map{$sock} = $host; 247 248 my $prefip = $self->{pref_ip}{$ip}; 248 249 $sin = Socket::sockaddr_in($port,Socket::inet_aton($prefip)); … … 260 261 unless ($connected) { 261 262 socket($sock, PF_INET, SOCK_STREAM, $proto); 263 $sock_map{$sock} = $host; 262 264 $sin = Socket::sockaddr_in($port,Socket::inet_aton($ip)); 263 265 my $timeout = $self ? $self->{connect_timeout} : 0.25; … … 270 272 } else { # it's a unix domain/local socket 271 273 socket($sock, PF_UNIX, SOCK_STREAM, 0); 274 $sock_map{$sock} = $host; 272 275 $sin = Socket::sockaddr_un($host); 273 276 my $timeout = $self ? $self->{connect_timeout} : 0.25; … … 284 287 select($old); 285 288 286 $sock_map{$sock} = $host;287 289 $cache_sock{$host} = $sock; 288 290
