• John McCutchan's avatar
    Improve flutter_tools handling of the device being unplugged while syncing DevFS (#9431) · acd75c0a
    John McCutchan authored
    - [x] Catch SocketErrors and handle them gracefully.
    - [x] Print 'Lost connection to device' when the service protocol connection is severed unexpectedly.
    - [x] Print 'Application finished' when the application exits otherwise.
    
    After this PR:
    
    ```
    Launching lib/main.dart on Nexus 7 in debug mode...
    Running 'gradle assembleDebug'...                     1.2s
    Built build/app/outputs/apk/app-debug.apk (21.7MB).
    Syncing files to device...
    Application finished.
    DevFS sync failed. Lost connection to device: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 53062
    Could not perform initial file synchronization.
    ```
    
    Fixes #6705
    acd75c0a
Name
Last commit
Last update
..
bin Loading commit data...
gradle Loading commit data...
lib Loading commit data...
schema Loading commit data...
templates Loading commit data...
test Loading commit data...
tool Loading commit data...
BUILD.gn Loading commit data...
README.md Loading commit data...
flutter_tools.iml Loading commit data...
pubspec.yaml Loading commit data...