Merge pull request #1113 from abarth/handle_port_error

`flutter start` crashes when port 8181 is in use
This commit is contained in:
Adam Barth 2016-01-07 10:12:31 -08:00
commit e3668470c7

View File

@ -772,7 +772,11 @@ class AndroidDevice extends Device {
void _forwardObservatoryPort() { void _forwardObservatoryPort() {
// Set up port forwarding for observatory. // Set up port forwarding for observatory.
String portString = 'tcp:$_observatoryPort'; String portString = 'tcp:$_observatoryPort';
try {
runCheckedSync(adbCommandForDevice(['forward', portString, portString])); runCheckedSync(adbCommandForDevice(['forward', portString, portString]));
} catch (e) {
logging.warning('Unable to forward observatory port ($_observatoryPort):\n$e');
}
} }
bool startBundle(AndroidApk apk, String bundlePath, { bool startBundle(AndroidApk apk, String bundlePath, {