Skip to content

Commit f17ec58

Browse files
committed
make timeout optional
1 parent 2eb60e1 commit f17ec58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

growthbook/growthbook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def destroy(self) -> None:
120120

121121

122122
class SSEClient:
123-
def __init__(self, api_host, client_key, on_event, reconnect_delay=5, headers=None, timeout=30):
123+
def __init__(self, api_host, client_key, on_event, reconnect_delay=5, headers=None, timeout = 30):
124124
self.api_host = api_host
125125
self.client_key = client_key
126126

@@ -409,7 +409,7 @@ async def _fetch_features_async(
409409
return data
410410

411411

412-
def startAutoRefresh(self, api_host, client_key, cb, streaming_timeout):
412+
def startAutoRefresh(self, api_host, client_key, cb, streaming_timeout=30):
413413
if not client_key:
414414
raise ValueError("Must specify `client_key` to start features streaming")
415415
self.sse_client = self.sse_client or SSEClient(api_host=api_host, client_key=client_key, on_event=cb, timeout=streaming_timeout)

0 commit comments

Comments
 (0)