From 7da3ef3e25d440e511a0c9dae4f212bda45a5cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Wed, 2 Jun 2021 10:03:56 +0000 Subject: [PATCH] fix: connect.pl: decode 2K bytes of the ttyrec instead of 1K to not miss messages --- bin/shell/connect.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/shell/connect.pl b/bin/shell/connect.pl index 5350b3c..d950e73 100755 --- a/bin/shell/connect.pl +++ b/bin/shell/connect.pl @@ -143,11 +143,11 @@ if ($sshClientHasOptionE) { my @comments; my $header; if (open(my $fh_ttyrec, '<', $saveFile)) { - read $fh_ttyrec, $header, 1000; # 1K if there's the host key changed warning + read $fh_ttyrec, $header, 2000; # 2K if there's the host key changed warning close($fh_ttyrec); } elsif (-r "$saveFile.zst") { - my $fnret = OVH::Bastion::execute(cmd => ['zstd', '-d', '-c', "$saveFile.zst"], max_stdout_bytes => 1000, must_succeed => 1); + my $fnret = OVH::Bastion::execute(cmd => ['zstd', '-d', '-c', "$saveFile.zst"], max_stdout_bytes => 2000, must_succeed => 1); $header = join("\n", @{$fnret->value->{'stdout'} || []}) if $fnret; }