Skip to content

Commit

Permalink
Remove the pending_data stuff
Browse files Browse the repository at this point in the history
This wasn't so great. Pending Data could be only MINPIC, XINPIC and
CONTACTID lines and it *might* be reasonable to buffer them in the
case of no clients, but they'll never be buffered when there's more
than one client.

Also when pending data is sent, it doesn't come with timestamps.

To make some reliable way for a client to ensure that it doesn't miss
any pending data would require numbered streams or event times, and
an extension to the protocol.
  • Loading branch information
nickandrew committed Jan 16, 2015
1 parent 25aacd5 commit 32503dd
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/AlarmDaemon/Controller.pm
Expand Up @@ -50,7 +50,6 @@ sub new {
client_sockets => {},
condvar => AnyEvent->condvar,
listeners => {},
pending_data => undef,
server => undef,
};

Expand Down Expand Up @@ -134,12 +133,6 @@ sub addClient {
$self->{clients}++;

LS30::Log::timePrint("New client " . $client->peerhost());

if (defined $self->{pending_data}) {
LS30::Log::timePrint("Sent pending: $self->{pending_data}");
$client->send($self->{pending_data});
$self->{pending_data} = undef;
}
}

=item I<removeClient($client)>
Expand Down

0 comments on commit 32503dd

Please sign in to comment.