Fix concurrent modification error (#48916)

This commit is contained in:
Christopher Fujino
2020-01-23 18:23:03 -08:00
committed by Flutter GitHub Bot
parent da369e9df2
commit 0c2f51fca7
2 changed files with 20 additions and 1 deletions

View File

@@ -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);
}
}