From 1a39f146b67797ed5d0f913c62a4698aac38656f Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Mon, 23 Dec 2024 10:52:40 -0500 Subject: [PATCH] fix: Close SSE thread on shutdown --- ldclient/impl/datasource/streaming.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldclient/impl/datasource/streaming.py b/ldclient/impl/datasource/streaming.py index 0a44746b..d4f89b59 100644 --- a/ldclient/impl/datasource/streaming.py +++ b/ldclient/impl/datasource/streaming.py @@ -114,6 +114,8 @@ def stop(self): def __stop_with_error_info(self, error: Optional[DataSourceErrorInfo]): log.info("Stopping StreamingUpdateProcessor") self._running = False + if self._sse: + self._sse.close() if self._data_source_update_sink is None: return