if( $sock->send( ) ) { push @{ $timeouts{ int( time() ) + 10 ) }, $sock; } else { ## handle send failures } #### ... for my $sock ( @{ $timeouts{ int( time() ) { shutdown $sock, 2; close $sock; $poll->remove( $sock ); ## log failure. }