From c4994ed2e851e05886521a9457bd6f7ddce2742e Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Tue, 7 Jul 2015 10:43:13 +0200 Subject: [PATCH] Fixes #6915: cf-agent writes incorrect files when the server answers too slowly during recursive copy --- .../0016-close-connection-after-timeout.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 rudder-agent/SOURCES/patches/cfengine/0016-close-connection-after-timeout.patch diff --git a/rudder-agent/SOURCES/patches/cfengine/0016-close-connection-after-timeout.patch b/rudder-agent/SOURCES/patches/cfengine/0016-close-connection-after-timeout.patch new file mode 100644 index 000000000..4a4cb71c2 --- /dev/null +++ b/rudder-agent/SOURCES/patches/cfengine/0016-close-connection-after-timeout.patch @@ -0,0 +1,11 @@ +diff -ur a/libcfnet/classic.c b/libcfnet/classic.c +--- a/libcfnet/classic.c 2014-06-03 14:39:00.000000000 +0200 ++++ b/libcfnet/classic.c 2015-07-07 09:41:57.058600817 +0200 +@@ -77,6 +77,7 @@ + } + else if (LastRecvTimedOut()) + { ++ close(sd); + Log(LOG_LEVEL_ERR, + "Timeout - remote end did not respond with the expected amount of data (received=%d, expecting=%d). (recv: %s)", + already, toget, GetErrorStr());