Permalink
Browse files

errno is no longer zero coming out of IO::AIO

As of IO::AIO 3.7, you have to actually read the return code.
  • Loading branch information...
1 parent ec07ca0 commit 3031ab7fd6a18e039eb0b273c8d9fc330a77b1e1 @dormando dormando committed Jun 8, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Perlbal/ClientHTTP.pm
  2. +1 −1 lib/Perlbal/ClientProxy.pm
@@ -294,7 +294,7 @@ sub handle_delete {
# now attempt the unlink
Perlbal::AIO::aio_unlink($self->{service}->{docroot} . '/' . $uri, sub {
my $err = shift;
- if ($err == 0 && !$!) {
+ if ($err == 0) {
# delete was successful
return $self->send_response(204);
} elsif ($! == ENOENT) {
@@ -1207,7 +1207,7 @@ sub purge_buffered_upload {
eval {
# now asynchronously unlink the file
Perlbal::AIO::aio_unlink($self->{bufilename}, sub {
- if ($!) {
+ if ($_[0] != 0 && $!) {
# note an error, but whatever, we'll either overwrite the file later (O_TRUNC | O_CREAT)
# or a cleaner will come through and do it for us someday (if the user runs one)
Perlbal::log('warning', "Unable to link $self->{bufilename}: $!");

0 comments on commit 3031ab7

Please sign in to comment.