gearman/perl-Gearman-Client — pull request #1 by samv (2011-11-09 00:06:19+00:00)
Title: Fix to an undef error

If the _get_js_sock function returns undef, it is placed into the
loaned_sock property inside _get_loaned_sock. This can cause
'Can't call method "close" on an undefined value' later on; so, don't
put undef in there, and don't die when the value is undef.

Full(er) exception from real use:

Internal error in request handler : Can't call method "close" on an undefined value at /home/comet/archetypepad-20110927.01/archetype/lib/Catalyst/Plugin/ArcheType.pm line 33
Catalyst::Plugin::ArcheType::__ANON__('Can\'t call method "close" on an undefined value at /usr/lib/...') called at /usr/lib/perl5/site_perl/5.8.5/Gearman/Taskset.pm line 87
Gearman::Taskset::cancel('Gearman::Taskset=ARRAY(0x2190b3d0)') called at /usr/lib/perl5/site_perl/5.8.5/Gearman/Taskset.pm line 142
Gearman::Taskset::wait('Gearman::Taskset=ARRAY(0x2190b3d0)', 'timeout', 0.2) called at /home/comet/archetypepad-20110927.01/core/lib/TypeCore/Util/Fetcher.pm line 313
TypeCore::Util::Fetcher::fetch_multi('TypeCore::Util::Fetcher', 'ARRAY(0x1403d410)', 'wait_on_miss', 0.2, 'wait_on_stale', 0.1) called at /home/comet/archetypepad-20110927.01/archetype/lib/ArcheType/C/User.pm line 3699