Skip to content

Commit dd46cde

Browse files
committed
warn if stopping an already stopped sse client
1 parent 2cd3193 commit dd46cde

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

splitio/push/splitsse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def connect(url):
122122
def stop(self, blocking=False, timeout=None):
123123
"""Abort the ongoing connection."""
124124
if self._status == SplitSSEClient._Status.IDLE:
125-
raise Exception('SseClient not running')
125+
_LOGGER.warn('sse already closed. ignoring')
126+
return
127+
126128
self._client.shutdown()
127129
if blocking:
128130
self._sse_connection_closed.wait(timeout)

0 commit comments

Comments
 (0)