X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote%2FReadChannel.pm;h=ed29f582628139db13a2b37a0abfc902c960c15d;hb=5add5e29851e82862e4d8f6d67dfce559f6685ce;hp=f6a7cca65c1dada32a5e1a405d979918151b7035;hpb=b7a853b30e7397854a813f6a5878e50703a20079;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote/ReadChannel.pm b/lib/Object/Remote/ReadChannel.pm index f6a7cca..ed29f58 100644 --- a/lib/Object/Remote/ReadChannel.pm +++ b/lib/Object/Remote/ReadChannel.pm @@ -2,10 +2,11 @@ package Object::Remote::ReadChannel; use CPS::Future; use Scalar::Util qw(weaken openhandle); -use Object::Remote::Logging qw(:log :dlog); -use POSIX; +use Object::Remote::Logging qw(:log :dlog router ); use Moo; +BEGIN { router()->exclude_forwarding } + has fh => ( is => 'ro', required => 1, trigger => sub { @@ -39,10 +40,7 @@ sub _receive_data_from { while (my $cb = $self->on_line_call and $$rb =~ s/^(.*)\n//) { $cb->(my $line = $1); } - #TODO this isn't compatible with Windows but would be if - #EAGAIN was set to something that could never match - #if on Windows - } elsif ($! != EAGAIN) { + } else { log_trace { "Got EOF or error, this read channel is done" }; Object::Remote->current_loop ->unwatch_io(