diff --git a/apps/third/dahua.py b/apps/third/dahua.py index 6f4a0ab1..9b027b27 100644 --- a/apps/third/dahua.py +++ b/apps/third/dahua.py @@ -46,7 +46,7 @@ class DhClient: 'client_id': self.client_id, 'client_secret': self.client_secret } - is_ok, res = self.request(**dhapis['token_login'], params=params, raise_exception=False, timeout=2) + is_ok, res = self.request(**dhapis['token_login'], params=params, raise_exception=False, timeout=10) if is_ok == 'success': cache.set('dh_token', res['access_token'], timeout=None) self.isGetingToken = False diff --git a/apps/third/xunxi.py b/apps/third/xunxi.py index a71d7419..678c4716 100644 --- a/apps/third/xunxi.py +++ b/apps/third/xunxi.py @@ -39,7 +39,7 @@ class XxClient: json = { 'licence': self.licence } - is_ok, res = self.request(**xxapis['token_login'], json=json, raise_exception=False, timeout=2) + is_ok, res = self.request(**xxapis['token_login'], json=json, raise_exception=False, timeout=10) if is_ok == 'success': cache.set('xx_token', res['token'], timeout=None) self.isGetingToken = False