Skip to content

Commit

Permalink
fix: timeout can be negative (#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM committed Feb 5, 2021
1 parent 5e2767a commit 97c6b59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jina/peapods/runtimes/jinad/client.py
Expand Up @@ -113,7 +113,7 @@ def create(self, args: 'Namespace') -> Optional[str]:

try:
payload = replace_enum_to_str(vars(self._mask_args(args)))
r = requests.post(url=self.store_api, json=payload, timeout=args.timeout_ready)
r = requests.post(url=self.store_api, json=payload, timeout=args.timeout_ready if args.timeout_ready > 0 else self.timeout)
rj = r.json()
if r.status_code == 201:
return rj
Expand Down

0 comments on commit 97c6b59

Please sign in to comment.