error when we can't connect to socket
[vrDialog] / 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;