error when we can't connect to socket
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Jan 2015 21:59:07 +0000 (21:59 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 18 Jan 2015 21:59:07 +0000 (21:59 +0000)
dialog.pl

index 2174f07..381d1e4 100755 (executable)
--- a/dialog.pl
+++ b/dialog.pl
@@ -42,6 +42,7 @@ my $sock = IO::Socket::INET->new(
        PeerPort => '23000',
        Proto    => 'tcp'
 );
+die "can't connect" unless $sock;
 
 sub read_serial {
        my $len = shift;