From 22106589cb1886db6fc878e5701fdb7bc7e2537a Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Mon, 23 Dec 2024 11:33:33 -0500 Subject: [PATCH] fix: Close SSE thread on shutdown (#320) --- 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 0a44746..d4f89b5 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