Skip to content
Browse files

add a small delay between each message

  • Loading branch information...
1 parent 8a9ecea commit 573d281e4a8b4e4e4b10a252ed3c3b451e0c0a8b @maddingue committed Sep 17, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 t/facilities-routing.t
View
3 t/facilities-routing.t
@@ -66,6 +66,7 @@ if ($child_pid) {
else {
# child: send messages to the syslog server
sleep 2;
+ my $delay = .01;
setlogsock({ host => $host, type => $proto, port => $port });
# first way, set the facility each time with openlog()
@@ -75,6 +76,7 @@ else {
for my $level (@levels) {
eval { syslog($level => "<$facility\:$level>") }
or warn "error: syslog($level => '<$facility\:$level>'): $@";
+ select undef, undef, undef, $delay;
}
}
@@ -86,6 +88,7 @@ else {
for my $level (@levels) {
eval { syslog("$facility.$level" => "<$facility\:$level>") }
or warn "error: syslog('$facility.$level' => '<$facility\:$level>'): $@";
+ select undef, undef, undef, $delay;
}
}

0 comments on commit 573d281

Please sign in to comment.
Something went wrong with that request. Please try again.