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

Comparing AnyEvent-MP/MP/Global.pm (file contents):
Revision 1.11 by root, Fri Aug 28 00:22:04 2009 UTC vs.
Revision 1.12 by root, Fri Aug 28 00:26:04 2009 UTC

191 mon $port, sub { 191 mon $port, sub {
192 unreg_groups $node; 192 unreg_groups $node;
193 delete $port{$node}; 193 delete $port{$node};
194 }; 194 };
195 195
196 use Data::Dumper; warn Dumper ["addr => ", $AnyEvent::MP::Kernel::LISTENER];#d#
197 snd $port, addr => $AnyEvent::MP::Kernel::LISTENER; 196 snd $port, addr => $AnyEvent::MP::Kernel::LISTENER;
198 snd $port, connect_nodes => \%addr if %addr; 197 snd $port, connect_nodes => \%addr if %addr;
199 snd $port, set => \%lreg if %lreg; 198 snd $port, set => \%lreg if %lreg;
200} 199}
201 200
215 # to help listener-less nodes, we broadcast new addresses to them unconditionally 214 # to help listener-less nodes, we broadcast new addresses to them unconditionally
216 #TODO: should be done by a node finding out about a listener-less one 215 #TODO: should be done by a node finding out about a listener-less one
217 if (@$addresses) { 216 if (@$addresses) {
218 for my $other (values %AnyEvent::MP::NODE) { 217 for my $other (values %AnyEvent::MP::NODE) {
219 if ($other->{transport}) { 218 if ($other->{transport}) {
220 if ($addr{$other->{id}}) { 219 if ($addr{$other->{id}} && !@{ $addr{$other->{id}} }) {
221 if (!@{ $addr{$other->{id}} }) {
222 $AnyEvent::MP::Kernel::WARN->(9, "helping $other->{id} to find $node."); 220 $AnyEvent::MP::Kernel::WARN->(9, "helping $other->{id} to find $node.");
223 snd $port{$other->{id}}, connect_nodes => { $node => $addresses }; 221 snd $port{$other->{id}}, connect_nodes => { $node => $addresses };
224 }
225 } 222 }
226 } 223 }
227 } 224 }
228 } 225 }
229 }, 226 },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines