Roll package:dds to 1.7.3 and add error handling for VM service disappearing (#74272)
This commit is contained in:
parent
914c9aa304
commit
e2e3976a12
@ -31,7 +31,7 @@ dependencies:
|
||||
coverage: 0.14.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
csslib: 0.16.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dds: 1.7.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dds: 1.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
devtools: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
devtools_server: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
devtools_shared: 0.9.5+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@ -96,4 +96,4 @@ dev_dependencies:
|
||||
|
||||
node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: e6e5
|
||||
# PUBSPEC CHECKSUM: f0e6
|
||||
|
@ -66,6 +66,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
|
||||
'url_launcher': '6.0.0-nullsafety.1',
|
||||
'connectivity': '3.0.0-nullsafety.1',
|
||||
'device_info': '2.0.0-nullsafety.1',
|
||||
'camera': '0.6.4+5',
|
||||
};
|
||||
|
||||
class UpdatePackagesCommand extends FlutterCommand {
|
||||
|
@ -34,7 +34,8 @@ typedef PrintStructuredErrorLogMethod = void Function(vm_service.Event);
|
||||
|
||||
WebSocketConnector _openChannel = _defaultOpenChannel;
|
||||
|
||||
/// The error codes for the JSON-RPC standard.
|
||||
/// The error codes for the JSON-RPC standard, including VM service specific
|
||||
/// error codes.
|
||||
///
|
||||
/// See also: https://www.jsonrpc.org/specification#error_object
|
||||
abstract class RPCErrorCodes {
|
||||
@ -49,6 +50,11 @@ abstract class RPCErrorCodes {
|
||||
|
||||
/// Application specific error codes.
|
||||
static const int kServerError = -32000;
|
||||
|
||||
/// Non-standard JSON-RPC error codes:
|
||||
|
||||
/// The VM service or extension service has disappeared.
|
||||
static const int kServiceDisappeared = 112;
|
||||
}
|
||||
|
||||
/// A function that reacts to the invocation of the 'reloadSources' service.
|
||||
@ -718,8 +724,10 @@ extension FlutterVmService on vm_service.VmService {
|
||||
);
|
||||
return response.json;
|
||||
} on vm_service.RPCError catch (err) {
|
||||
// If an application is not using the framework
|
||||
if (err.code == RPCErrorCodes.kMethodNotFound) {
|
||||
// If an application is not using the framework or the VM service
|
||||
// disappears while handling a request, return null.
|
||||
if ((err.code == RPCErrorCodes.kMethodNotFound)
|
||||
|| (err.code == RPCErrorCodes.kServiceDisappeared)) {
|
||||
return null;
|
||||
}
|
||||
rethrow;
|
||||
|
@ -10,7 +10,7 @@ dependencies:
|
||||
# To update these, use "flutter update-packages --force-upgrade".
|
||||
archive: 2.0.13
|
||||
args: 1.6.0
|
||||
dds: 1.7.2
|
||||
dds: 1.7.3
|
||||
dwds: 7.1.1
|
||||
completion: 0.2.3
|
||||
coverage: 0.14.2
|
||||
@ -110,4 +110,4 @@ dartdoc:
|
||||
# Exclude this package from the hosted API docs.
|
||||
nodoc: true
|
||||
|
||||
# PUBSPEC CHECKSUM: c7c3
|
||||
# PUBSPEC CHECKSUM: 4cc4
|
||||
|
Loading…
x
Reference in New Issue
Block a user