Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to an undef error #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix to an undef error #1

wants to merge 1 commit into from

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