From 2c4b3387b797e9ae88790c2ca0a8dde4e848c86e Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Mon, 22 Feb 2010 19:16:18 +0100 Subject: Cancel timeout to avoid stupid race condition. --- emergencyc.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/emergencyc.pl b/emergencyc.pl index c460dc1..5cd3034 100755 --- a/emergencyc.pl +++ b/emergencyc.pl @@ -78,6 +78,7 @@ eval { do { $sender = recv($socket, $buf, 16384, 0); } while ( defined($sender) && $sender ne $haddr ); + alarm 0; }; if ( $@ ) { print "timeout\n"; -- cgit v1.2.3