From e8591303694c2432be91ff175dbb2d5f49f2cb47 Mon Sep 17 00:00:00 2001 From: Johanna Amann Date: Wed, 15 Jun 2016 17:08:35 -0700 Subject: [PATCH] Exec: fix reader cleanup when using read_files Wen using read_files, the Exec framework called Input::remove on the wrong input stream: it always got called on the input stream of the execution, not on the input stream of the current file that was being read. This lead to threads never being closed and file handles being kept open until Bro is closed. This means that before this patch, every time ActiveHTTP is used, a thread stays around and several file handles are used. --- scripts/base/utils/exec.bro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base/utils/exec.bro b/scripts/base/utils/exec.bro index 15d88e9851..a926775bda 100644 --- a/scripts/base/utils/exec.bro +++ b/scripts/base/utils/exec.bro @@ -116,7 +116,7 @@ event Input::end_of_data(orig_name: string, source:string) if ( track_file !in result$files ) result$files[track_file] = vector(); - Input::remove(name); + Input::remove(orig_name); if ( name !in pending_files ) delete pending_commands[name];