ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/Node.pm
(Generate patch)

Comparing AnyEvent-MP/MP/Node.pm (file contents):
Revision 1.31 by root, Fri Aug 28 23:06:33 2009 UTC vs.
Revision 1.32 by root, Sun Aug 30 09:24:09 2009 UTC

58 push @{$self->{queue}}, shift; 58 push @{$self->{queue}}, shift;
59 $self->connect; 59 $self->connect;
60 }; 60 };
61} 61}
62 62
63# called only after successful handshake 63# called each time we fail to establish a connection,
64# or the existing connection failed
64sub transport_error { 65sub transport_error {
65 my ($self, @reason) = @_; 66 my ($self, @reason) = @_;
66 67
67 my $no_transport = !$self->{transport}; 68 my $no_transport = !$self->{transport};
68 69
76 $_->(@reason) for map @$_, values %$mon; 77 $_->(@reason) for map @$_, values %$mon;
77 } 78 }
78 79
79 AnyEvent::MP::Kernel::_inject_nodeevent ($self, 0, @reason) 80 AnyEvent::MP::Kernel::_inject_nodeevent ($self, 0, @reason)
80 unless $no_transport; 81 unless $no_transport;
82
83 # if we are here and are idle, we nuke ourselves
84 delete $AnyEvent::MP::Kernel::NODE{$self->{id}}
85 unless $self->{transport} || $self->{connect_to};
81} 86}
82 87
83# called after handshake was successful 88# called after handshake was successful
84sub transport_connect { 89sub transport_connect {
85 my ($self, $transport) = @_; 90 my ($self, $transport) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines