Skip to content

Commit 3c5f69b

Browse files
eb set timeout to be options.timeout (#445)
1 parent eb7a909 commit 3c5f69b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

statsig/statsig_error_boundary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def set_statsig_options_and_metadata(
2929
):
3030
self._options = statsig_options
3131
self._metadata = statsig_metadata
32+
self._timeout = statsig_options.timeout
3233

3334
def set_diagnostics(self, diagnostics: Diagnostics):
3435
self._diagnostics = diagnostics
@@ -121,6 +122,7 @@ def log_exception(
121122

122123
def _post_exception(self, name, info, tag, extra):
123124
try:
125+
timeout = self._timeout if self._timeout is not None else REQUEST_TIMEOUT
124126
requests.post(
125127
self.endpoint,
126128
json={
@@ -139,7 +141,7 @@ def _post_exception(self, name, info, tag, extra):
139141
"STATSIG-SDK-TYPE": self._metadata["sdkType"],
140142
"STATSIG-SDK-VERSION": self._metadata["sdkVersion"],
141143
},
142-
timeout=REQUEST_TIMEOUT,
144+
timeout=timeout,
143145
)
144146
except BaseException:
145147
# no-op, best effort

0 commit comments

Comments
 (0)