From 57a649a8161c5fdc711c003af81a71354b092994 Mon Sep 17 00:00:00 2001 From: Chunyong Lin Date: Tue, 13 Feb 2018 21:58:45 -0800 Subject: [PATCH] [rule processor] explicitly close firehose connection --- stream_alert/rule_processor/firehose.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stream_alert/rule_processor/firehose.py b/stream_alert/rule_processor/firehose.py index 455b40019..a8d5402d1 100644 --- a/stream_alert/rule_processor/firehose.py +++ b/stream_alert/rule_processor/firehose.py @@ -286,3 +286,7 @@ def send(self): self._limit_record_size(record_batch) for sized_batch in self._segment_records_by_size(record_batch): self._firehose_request_helper(stream_name, sized_batch) + + # explicitly close firehose client to resolve connection reset issue, suggested + # by AWS support team. + self._firehose_client._endpoint.http_session.close() #pylint: disable=protected-access