You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Remove hardcoded port for livesync on Android
Currently the LiveSync operations on Android devices uses a hardcoded port - 18182 to wait for a message from the runtime and determines if we should clean the LiveSync temp directories on the device.
The port forwarding is executed every time on all of the devices. This is a problem when the hardcoded port is already used by another application.
In order to fix this, execute the port forwarding only once per device and persist the port. Use the newly introduced method in android-process-service, which will check if there's already a forwarded port for the specified abstract port. In case there's no such forwarding, a new free port is taken and the forwarding is executed. Once CLI finishes its work, the port forwarding is removed.
This ensures we'll execute only one port forwarding per device and also we'll not clash with other applications as the port is no longer hardcoded.
0 commit comments