X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FHTTP%2FDaemon.pm;h=53cd2544c2ff3be3cc41ea3228e7152083502803;hb=aea15dfa439e94a91a8c08bcf6ad53913730abd2;hp=40cd596f93259eee869178f6842a8489f1cead33;hpb=16d65a0eefcca6f2210d6d3fb48f385052b2711a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/HTTP/Daemon.pm b/lib/Catalyst/Engine/HTTP/Daemon.pm index 40cd596..53cd254 100644 --- a/lib/Catalyst/Engine/HTTP/Daemon.pm +++ b/lib/Catalyst/Engine/HTTP/Daemon.pm @@ -121,7 +121,11 @@ sub run { my $nread = $client->sysread( my $buf, 4096 ); - unless ( defined($nread) && length($buf) ) { + unless ( $nread ) { + + next if $! == EWOULDBLOCK; + next if $! == EINPROGRESS; + next if $! == EINTR; $select->remove($client); $client->close; @@ -180,7 +184,11 @@ sub run { $client->response_length, $client->response_offset ); - unless ( defined($nwrite) ) { + unless ( $nwrite ) { + + next if $! == EWOULDBLOCK; + next if $! == EINPROGRESS; + next if $! == EINTR; $select->remove($client); $client->close;