--- projects/cms/source/host/ihost-perl/ihost.pl 2001/02/28 12:25:48 1.21 +++ projects/cms/source/host/ihost-perl/ihost.pl 2001/03/01 10:49:27 1.22 @@ -10,7 +10,7 @@ # - pjm2@ukc.ac.uk # # $Author: pjm2 $ -# $Id: ihost.pl,v 1.21 2001/02/28 12:25:48 pjm2 Exp $ +# $Id: ihost.pl,v 1.22 2001/03/01 10:49:27 pjm2 Exp $ #------------------------------------------------------------ $| = 1; @@ -304,7 +304,7 @@ sub send_tcp_heartbeat() { print $sock "HEARTBEAT\n"; $response = <$sock>; - chop $response; + chop $response or return; if (!$response eq "OK") { close($sock); print "Server gave wrong response to HEARTBEAT: $response\n"; @@ -313,7 +313,7 @@ sub send_tcp_heartbeat() { print $sock "CONFIG\n"; $response = <$sock>; - chop $response; + chop $response or return; if (!$response eq "OK") { close($sock); print "Server gave wrong response to CONFIG: $response\n"; @@ -322,7 +322,7 @@ sub send_tcp_heartbeat() { print $sock "$file_list\n"; $response = <$sock>; - chop $response; + chop $response or return; if (!$response eq "OK") { close($sock); print "Server gave wrong response to file list: $response\n"; @@ -331,7 +331,7 @@ sub send_tcp_heartbeat() { print $sock "$last_modified\n"; $response = <$sock>; - chop $response; + chop $response or return; if ($response eq "ERROR") { close($sock); &tcp_configure(); @@ -344,7 +344,7 @@ sub send_tcp_heartbeat() { } print $sock "ENDHEARTBEAT\n"; - $response = <$sock>; + $response = <$sock> or return; chop $response; if (!$response eq "OK") { close($sock);