mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
fix potential network issue
This commit is contained in:
@@ -206,19 +206,22 @@ class AppDio with DioMixin {
|
|||||||
: rhttp.ProxySettings.proxy(proxy!),
|
: rhttp.ProxySettings.proxy(proxy!),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
var res = super.request<T>(
|
try {
|
||||||
path,
|
return super.request<T>(
|
||||||
data: data,
|
path,
|
||||||
queryParameters: queryParameters,
|
data: data,
|
||||||
cancelToken: cancelToken,
|
queryParameters: queryParameters,
|
||||||
options: options,
|
cancelToken: cancelToken,
|
||||||
onSendProgress: onSendProgress,
|
options: options,
|
||||||
onReceiveProgress: onReceiveProgress,
|
onSendProgress: onSendProgress,
|
||||||
);
|
onReceiveProgress: onReceiveProgress,
|
||||||
if(_requests.containsKey(path)) {
|
);
|
||||||
_requests.remove(path);
|
}
|
||||||
|
finally {
|
||||||
|
if(_requests.containsKey(path)) {
|
||||||
|
_requests.remove(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user