From 72194bf139e272c48d613c5c6704fb4978aea2b5 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 5 Apr 2012 14:41:11 +0200 Subject: [PATCH] Do not die if no packets are coming in. --- tools/mesh/lib/r0ket.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/mesh/lib/r0ket.pm b/tools/mesh/lib/r0ket.pm index 26267b9..d296a45 100755 --- a/tools/mesh/lib/r0ket.pm +++ b/tools/mesh/lib/r0ket.pm @@ -104,7 +104,7 @@ sub get_packet{ }; my $cnt=0; - while(++$cnt<100){ + while(1){ if(length($buffer)<2){ _get_bytes(); }elsif($buffer !~ /^\\[12]/){ @@ -123,8 +123,12 @@ sub get_packet{ }else{ _get_bytes(); }; + if(++$cnt%100 == 0){ + if(!$quiet){ + print STDERR "No packets for 5 seconds?\n"; + }; + }; }; - die "No packets for 5seconds?\n"; }; sub rest{