From 8e55b4f28838115c9cb3b85637d6b614da759cf6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 5 Feb 2020 09:37:09 +0100 Subject: [PATCH] storage_migrate: only set errfunc for send stream MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit since we redirect the output to our (insecure) socket, logfunc is only used for STDERR anyway, so we might as well make it explicit on the caller side. Signed-off-by: Fabian Grünbichler --- PVE/Storage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 2b292f6..62d72de 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -626,7 +626,7 @@ sub storage_migrate { or die "failed to connect to tunnel at $ip:$port\n"; # we won't be reading from the socket shutdown($socket, 0); - run_command([$send, @cstream], output => '>&'.fileno($socket), logfunc => $logfunc); + run_command([$send, @cstream], output => '>&'.fileno($socket), errfunc => $logfunc); # don't close the connection entirely otherwise the receiving end # might not get all buffered data (and fails with 'connection reset by peer') shutdown($socket, 1); -- 2.39.2