delete $conn->{cmd};
$conn->{timeout}->del if $conn->{timeout};
delete $conn->{timeout};
- $conn->_send_file("$main::data/connected");
- Msg->sleep(1);
&{$conn->{rproc}}($conn, "$dir$call|$sort");
+ $conn->_send_file("$main::data/connected");
}
sub new_client {
*STDOUT = IO::File->new_from_fd($b, 'w') or die;
*STDERR = IO::File->new_from_fd($b, 'w') or die;
close $a;
- unless ($^O =~ /^MS/) {
+ unless ($main::is_win) {
# $SIG{HUP} = 'IGNORE';
$SIG{HUP} = $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = 'DEFAULT';
alarm(0);
return;
}
if ($line =~ /\Q$expect/i) {
- dbg('connect', "got: \"$expect\" sending: \"$send\"");
- $conn->send_later("D$conn->{call}|$send");
+ if (length $send) {
+ dbg('connect', "got: \"$expect\" sending: \"$send\"");
+ $conn->send_later("D$conn->{call}|$send");
+ }
delete $conn->{msg}; # get rid any input if a match
return;
}
if ($f) {
while (<$f>) {
chomp;
+ dbg('connll', $_);
$conn->send_raw($_ . $conn->{lineend});
}
$f->close;