--- googlecode.com/svn/trunk/Meteor/Subscriber.pm 2008/01/25 17:12:02 35 +++ googlecode.com/svn/trunk/Meteor/Subscriber.pm 2008/02/03 23:53:55 44 @@ -44,6 +44,7 @@ our %PersistentConnections=(); our $NumAcceptedConnections=0; + ############################################################################### # Factory methods @@ -79,7 +80,7 @@ if(exists($PersistentConnections{$id})) { - $PersistentConnections{$id}->close(1); + $PersistentConnections{$id}->close(); } } @@ -89,7 +90,7 @@ my $msg=$::CONF{'PingMessage'}; my @cons=values %PersistentConnections; - map { $_->write($msg.chr(0)) } @cons; + map { $_->write($msg) } @cons; } sub checkPersistentConnectionsForMaxTime { @@ -272,7 +273,7 @@ } /gex; - $self->write($header.chr(0)); + $self->write($header); } sub sendMessage { @@ -282,7 +283,7 @@ $numMsgInThisBatch=1 unless(defined($numMsgInThisBatch)); - $self->write($msg.chr(0)); + $self->write($msg); $::Statistics->{'messages_served'}+=$numMsgInThisBatch; @@ -343,11 +344,14 @@ } } - $::Statistics->{'current_subscribers'}--; - $self->SUPER::close(); } +sub didClose { + + $::Statistics->{'current_subscribers'}--; +} + sub checkForMaxTime { my $self=shift; my $time=shift;