Subject: | Feature: Timeout support |
Date: | Thu, 15 Dec 2011 14:25:33 -0800 |
To: | bug-Redis [...] rt.cpan.org |
From: | Jeff <jeff [...] lanndark.com> |
It would be nice to allow a specified client timeout value for redis
operations. If the server is taking too long to respond, I don't really
want my process waiting around.
I believe this could be as simple as a one-line change to pass a timeout
value through into the IO::Socket::INET constructor, something like:
$self->{sock} = IO::Socket::INET->new(
PeerAddr => $self->{server},
Proto => 'tcp',
Timeout => $self->{timeout} || undef # I think undef is the current
behavior - untested.
) || confess...