X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXCluster.pm;h=3f2eda8e5c034b9b76944810ee08018d52e4e7bd;hp=4e94f4afb6ecb9c8f8b991c7bcef7639a84c6ff1;hb=0824a94355e5fb2b4c379bb013d66466725629f5;hpb=2546ef0cfaaca39e65985e414258071a636979af diff --git a/perl/DXCluster.pm b/perl/DXCluster.pm index 4e94f4af..3f2eda8e 100644 --- a/perl/DXCluster.pm +++ b/perl/DXCluster.pm @@ -137,6 +137,7 @@ sub new $node->{list}->{$call} = $self; # add this user to the list on this node $users++; dbg('cluster', "allocating user $call to $node->{call} in cluster\n"); + $node->update_users; return $self; } @@ -145,10 +146,11 @@ sub del my $self = shift; my $call = $self->{call}; my $node = $self->{mynode}; - + delete $node->{list}->{$call}; delete $DXCluster::cluster{$call}; # remove me from the cluster table dbg('cluster', "deleting user $call from $node->{call} in cluster\n"); + $node->update_users; $users-- if $users > 0; } @@ -206,6 +208,7 @@ sub del foreach $ref (values %{$self->{list}}) { $ref->del(); # this also takes them out of this list } + delete $DXCluster::cluster{$call}; # remove me from the cluster table dbg('cluster', "deleting node $call from cluster\n"); $nodes-- if $nodes > 0; }