… | |
… | |
54 | } |
54 | } |
55 | |
55 | |
56 | sub monitor { |
56 | sub monitor { |
57 | my ($self, $portid, $cb) = @_; |
57 | my ($self, $portid, $cb) = @_; |
58 | |
58 | |
59 | return $cb->("node failed conenction") |
59 | return $cb->(transport_error => "node unreachable") |
60 | if $self->{failed}; |
60 | if $self->{failed}; |
61 | |
61 | |
62 | my $list = $self->{lmon}{$portid} ||= []; |
62 | my $list = $self->{lmon}{$portid} ||= []; |
63 | |
63 | |
64 | $self->send (["", mon1 => $portid]) |
64 | $self->send (["", mon1 => $portid]) |
… | |
… | |
155 | |
155 | |
156 | [$w, \$g] |
156 | [$w, \$g] |
157 | }; |
157 | }; |
158 | } else { |
158 | } else { |
159 | delete $self->{retry}; |
159 | delete $self->{retry}; |
|
|
160 | $self->fail (transport_error => $self->{noderef}, "unable to connect"); |
160 | } |
161 | } |
161 | |
162 | |
162 | $self->{next_connect} = AE::timer $AnyEvent::MP::Base::CONNECT_INTERVAL, 0, sub { |
163 | $self->{next_connect} = AE::timer $AnyEvent::MP::Base::CONNECT_INTERVAL, 0, sub { |
163 | $self->connect; |
164 | $self->connect; |
164 | }; |
165 | }; |