Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

outgoing_http: Support fractional-second timeouts.

Alex Vandiverc7e92ee2f30b
diff --git a/zerver/lib/outgoing_http.py b/zerver/lib/outgoing_http.py
index cd5bff0e5f0..3283e0ecb5e 100644
--- a/zerver/lib/outgoing_http.py
+++ b/zerver/lib/outgoing_http.py
@@ -9,7 +9,7 @@ class OutgoingSession(requests.Session):
def __init__(
self,
role: str,
- timeout: int,
+ timeout: float,
headers: Optional[Dict[str, str]] = None,
max_retries: Optional[Union[int, Retry]] = None,
) -> None:
@@ -29,9 +29,9 @@ class OutgoingSession(requests.Session):
class OutgoingHTTPAdapter(requests.adapters.HTTPAdapter):
role: str
- timeout: int
+ timeout: float
- def __init__(self, role: str, timeout: int, max_retries: Optional[Retry]) -> None:
+ def __init__(self, role: str, timeout: float, max_retries: Optional[Retry]) -> None:
self.role = role
self.timeout = timeout
super().__init__(max_retries=max_retries)