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.23 by root, Sat Aug 15 02:36:03 2009 UTC vs.
Revision 1.24 by root, Sat Aug 15 04:34:34 2009 UTC

154 my ($self, $portid, $cb) = @_; 154 my ($self, $portid, $cb) = @_;
155 155
156 my $list = $self->{lmon}{$portid} ||= []; 156 my $list = $self->{lmon}{$portid} ||= [];
157 157
158 $self->send (["", mon1 => $portid]) 158 $self->send (["", mon1 => $portid])
159 unless @$list; 159 unless @$list || !length $portid;
160 160
161 push @$list, $cb; 161 push @$list, $cb;
162} 162}
163 163
164sub unmonitor { 164sub unmonitor {
206 206
207 # slave nodes are so cool - we can always send to them :) 207 # slave nodes are so cool - we can always send to them :)
208 208
209 $self->{send} = sub { 209 $self->{send} = sub {
210 $self->connect; 210 $self->connect;
211 snd $master, relay => $noderef, @_; 211 snd $master, snd => $noderef, @_;
212 }; 212 };
213 } 213 }
214} 214}
215 215
216sub connect { 216sub connect {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines