sub is_valid {
my ($self) = @_;
- my $closed = $self->on_close->is_ready;
+ my $valid = ! $self->on_close->is_ready;
- log_trace { "Connection closed: $closed" };
- return ! $closed;
+ log_trace {
+ my $id = $self->_id;
+ my $text;
+ if ($valid) {
+ $text = 'yes';
+ } else {
+ $text = 'no';
+ }
+ "Connection '$id' is valid: '$text'"
+ };
+
+ return $valid;
}
sub _fail_outstanding {
sub remote_sub {
my ($self, $sub) = @_;
my ($pkg, $name) = $sub =~ m/^(.*)::([^:]+)$/;
- Dlog_debug { "Invoking remote sub '$sub' for connection $_" } $self->_id;
+ Dlog_debug { "Invoking remote sub '$sub' for connection '$_'" } $self->_id;
return await_future($self->send_class_call(0, $pkg, can => $name));
}
log_trace { "call('$method') has been invoked on remote handle '$id'; creating future" };
future {
- log_debug { "Invoking send on connection for handle '$id' method $method" };
+ log_debug { "Invoking send on connection for handle '$id' method '$method'" };
$self->connection->send(call => $id, $w, $method, @args)
};
}
return $delay_max unless @$timers;
my $duration = $timers->[0]->[0] - time;
- log_trace { "next timer fires in '$duration' seconds " };
+ log_trace { "next timer fires in '$duration' seconds" };
if ($duration < 0) {
$duration = 0;
# differentiate between an error and a timeout.
# -- no, love, mst.
- log_trace { "Reading from all ready filehandles" };
+ log_trace { "Reading from ready filehandles" };
foreach my $fh (@$readable) {
next unless $read->{$fh};
$read_count++;
#under load
last;
}
- log_trace { "Writing to all ready filehandles" };
+ log_trace { "Writing to ready filehandles" };
foreach my $fh (@$writeable) {
next unless $write->{$fh};
$write_count++;