Skip to content

Conversation

@samv
Copy link

@samv samv commented Nov 9, 2011

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 REDACTED line XXX
REDACTED('Can't call method "close" on an undefined value at /usr/lib/...') called at /usr/lib/perl5/site_perl/5.X.Y/Gearman/Taskset.pm line 87
Gearman::Taskset::cancel('Gearman::Taskset=ARRAY(0x2190b3d0)') called at /usr/lib/perl5/site_perl/5.X.Y/Gearman/Taskset.pm line 142
Gearman::Taskset::wait('Gearman::Taskset=ARRAY(0x2190b3d0)', 'timeout', 0.2) called at REDACTED line XXX

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.
p-alik added a commit to p-alik/perl-Gearman-Client that referenced this pull request Oct 23, 2016
add repository to dist metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant