diff --git a/scripts/mosh b/scripts/mosh index 737500d..d5ce42c 100755 --- a/scripts/mosh +++ b/scripts/mosh @@ -263,7 +263,7 @@ if ( $pid == 0 ) { # child die "Bad MOSH CONNECT string: $_\n"; } } else { - if ( $port_request =~ m{:} and m{Bad UDP port} ) { + if ( defined $port_request and $port_request =~ m{:} and m{Bad UDP port} ) { $bad_udp_port_warning = 1; } print "$_\n";