Changeset 408 for trunk/lib/Perlbal/Plugin/AtomStream.pm
- Timestamp:
- 08/16/05 19:11:32 (4 years ago)
- Files:
-
- 1 modified
-
trunk/lib/Perlbal/Plugin/AtomStream.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Perlbal/Plugin/AtomStream.pm
r407 r408 11 11 our @subs; # subscribers 12 12 13 use constant MAX_LAG => 262144; 14 13 15 sub InjectFeed { 14 16 my $class = shift; … … 21 23 next; 22 24 } 23 $s->write($atomref); 25 26 my $lag = $s->{write_buf_size}; 27 28 if ($lag > MAX_LAG) { 29 $s->{scratch}{skipped_atom}++; 30 } else { 31 if (my $skip_count = $s->{scratch}{skipped_atom}) { 32 $s->{scratch}{skipped_atom} = 0; 33 $s->write(\ "<sorryTooSlow youMissed=\"$skip_count\" />\n"); 34 } 35 $s->write($atomref); 36 } 24 37 } 25 38
