|
|
@@ -154,7 +154,7 @@ namespace molilian.core
|
|
|
#if DEBUG
|
|
|
client.Proxy = null;
|
|
|
#else
|
|
|
- client.Timeout = TimeSpan.FromMilliseconds(5000);
|
|
|
+ client.Timeout = TimeSpan.FromMilliseconds(3000);
|
|
|
#endif
|
|
|
var response = client.Request(url);
|
|
|
|
|
|
@@ -287,7 +287,7 @@ namespace molilian.core
|
|
|
#endif
|
|
|
if (!string.IsNullOrEmpty(_user_agent)) client.UserAgent = _user_agent;
|
|
|
|
|
|
- client.Timeout = TimeSpan.FromMilliseconds(2000);
|
|
|
+ client.Timeout = TimeSpan.FromMilliseconds(1000);
|
|
|
var response = client.Request(url);
|
|
|
|
|
|
var body = string.Empty;
|
|
|
@@ -306,7 +306,7 @@ namespace molilian.core
|
|
|
{
|
|
|
new LoggerLibrary("api_error", "fail")
|
|
|
.Info(response.ResponseException.Message, response.ResponseException.StackTrace)
|
|
|
- .Save();
|
|
|
+ .SaveAsync();
|
|
|
throw response.ResponseException;
|
|
|
}
|
|
|
|
|
|
@@ -391,7 +391,7 @@ namespace molilian.core
|
|
|
new LoggerLibrary("api_error", "fail")
|
|
|
.Info(message, content)
|
|
|
.Info(headers, body)
|
|
|
- .Save();
|
|
|
+ .SaveAsync();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -462,7 +462,7 @@ namespace molilian.core
|
|
|
.AddHeaders("Cookie", _cookies);
|
|
|
client.Proxy = _proxy;
|
|
|
if (!string.IsNullOrEmpty(_user_agent)) client.UserAgent = _user_agent;
|
|
|
- client.Timeout = TimeSpan.FromMilliseconds(2000);
|
|
|
+ client.Timeout = TimeSpan.FromMilliseconds(1000);
|
|
|
#if DEBUG
|
|
|
client.Proxy = null;
|
|
|
client.Timeout = TimeSpan.FromMilliseconds(10000);
|
|
|
@@ -485,7 +485,7 @@ namespace molilian.core
|
|
|
{
|
|
|
new LoggerLibrary("api_error", "fail")
|
|
|
.Info(response.ResponseException.Message, response.ResponseException.StackTrace)
|
|
|
- .Save();
|
|
|
+ .SaveAsync();
|
|
|
throw response.ResponseException;
|
|
|
}
|
|
|
return result;
|
|
|
@@ -573,7 +573,7 @@ namespace molilian.core
|
|
|
new LoggerLibrary("api_error", "fail")
|
|
|
.Info(message, content)
|
|
|
.Info(headers, body)
|
|
|
- .Save();
|
|
|
+ .SaveAsync();
|
|
|
break;
|
|
|
}
|
|
|
}
|