Skip to content

Commit 973c7f9

Browse files
committed
fix possible race condition
1 parent 43cdc0d commit 973c7f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

splitio/push/sse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def start(self, url, extra_headers=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT)
159159

160160
def shutdown(self):
161161
"""Shutdown the current connection."""
162-
if self._conn is None:
162+
if self._conn is None or self._conn.sock is None:
163163
_LOGGER.warn("no sse connection has been started on this SSEClient instance. Ignoring")
164164
return
165165

0 commit comments

Comments
 (0)