Browse Source

Adjust time out to 15s

jimmy.jiang@vinno.com 1 year ago
parent
commit
06bb8f4fdd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lib/client_base.dart
  2. 1 1
      lib/http_pool.dart

+ 1 - 1
lib/client_base.dart

@@ -15,7 +15,7 @@ const _C_DIO_FUTURE_ERR_KEYWORDS = "browser_adapter";
 class JsonRpcClientBase {
   /// 默认超时时间
   // ignore: non_constant_identifier_names
-  static int DEAULT_TIMEOUT = 5000;
+  static int DEAULT_TIMEOUT = 15000;
 
   late int _timeout;
 

+ 1 - 1
lib/http_pool.dart

@@ -59,7 +59,7 @@ class _JsonRpcHttpPool {
       //  - text/plain
       final _client = FHttp(FHttpBaseOptions(
         baseUrl: baseUrl,
-        timeout: timeout ?? 5 * 1000,
+        timeout: timeout ?? 15 * 1000,
         headers: headers,
         contentType: dio.Headers.textPlainContentType,
         responseType: FHttpResponseType.json,