Permalink
Browse files

Reduce the ending timeout for wheel_tail.pm.

  • Loading branch information...
1 parent abba8d0 commit 49b986fda759a77198fd9a315474797b6619b376 @rcaputo committed Jul 12, 2014
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/POE/Test/Loops/wheel_tail.pm
@@ -82,6 +82,12 @@ sub sss_start {
sub sss_block {
my ($kernel, $heap, $block) = @_[KERNEL, HEAP, ARG0];
DEBUG and warn "=== handle tail got block ($block)";
+
+ if ($block eq 'DONEDONEDONEDONE') {
+ $kernel->delay( ev_timeout => 1 );
+ return;
+ }
+
$heap->{read_count}++;
$kernel->delay( ev_timeout => 10 );
}
@@ -191,6 +197,9 @@ sub client_tcp_got_alarm {
# Delay is 1 for slow hardware.
$kernel->delay( got_alarm => 1 );
}
+ else {
+ $heap->{wheel}->put( 'DONEDONEDONEDONE' );
+ }
}
sub client_tcp_got_error {

0 comments on commit 49b986f

Please sign in to comment.