Fix concurrent modification error (#48916)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
da369e9df2
commit
0c2f51fca7
@@ -809,7 +809,8 @@ class _IOSSimulatorDevicePortForwarder extends DevicePortForwarder {
|
||||
|
||||
@override
|
||||
Future<void> dispose() async {
|
||||
for (final ForwardedPort port in _ports) {
|
||||
final List<ForwardedPort> portsCopy = List<ForwardedPort>.from(_ports);
|
||||
for (final ForwardedPort port in portsCopy) {
|
||||
await unforward(port);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user