From d2df60c6cccc5a7aa10d311beb1528c08f505309 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 23 Oct 2015 15:35:55 +0200 Subject: IPTipset: Delay exit of __cleanup_iptables() It may happen on some systems that the iptables command line have completed removing ipset rules, but things aren't quite yet ready. This adds a 5 seconds delay before ipset tries to remove the ipset list. Signed-off-by: David Sommerseth --- LogActio/Reporters/IPTipset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LogActio/Reporters/IPTipset.py b/LogActio/Reporters/IPTipset.py index 37fd595..97539c9 100644 --- a/LogActio/Reporters/IPTipset.py +++ b/LogActio/Reporters/IPTipset.py @@ -24,7 +24,7 @@ # are deemed to be part of the source code. # -import sys, os, subprocess, tempfile, re +import sys, os, subprocess, tempfile, re, time import LogActio.Message, LogActio.ReporterQueue @@ -287,6 +287,7 @@ class IPTipset(LogActio.ReporterQueue.ReporterQueue): # Clean up os.close(nullfp) del nullfp + time.sleep(5) # Allow iptables to complete its job before indicating we're done def __processqueue(self): -- cgit