Commit b720651
committed
fix: livesync should stop when all devices are disconnected
Whenever all devices/emulators/simulators that we are using for LiveSync operation are disconnected or we are unable to sync changes on them, the command (`tns debug`, `tns run`...) should exit.
This is not happening currently due to the setIntervals and iOS device detection that happens and does not stop when the devices are disconnected. So workaround the problem by handling the liveSyncStopped event for the livesync related commands. In case we receive liveSyncStopped for all devices that we've been using for LiveSync action, call process.exit. Use non-zero exit code for this case, as if we receive liveSyncStopped event, we've either received error for particular device or it has been stopped. For both cases this is not a correct behavior for LiveSync.1 parent d50b5d4 commit b720651
File tree
6 files changed
+668
-643
lines changed- lib
- common
- definitions
- helpers
- services/livesync
- test
6 files changed
+668
-643
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
| 600 | + | |
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
0 commit comments