At the moment when an adb shell command is run the cleanup for setting up a device socket is done as soon as connect_to_device_socket exits, meaning that theres a race between the shell command using the socket and it being torn down.
Changing connect_to_device_socket so it uses its parents reslist, effectively postponing the teardown till the command has run
At the moment when an adb shell command is run the cleanup for setting up a device socket is done as soon as
connect_to_device_socket
exits, meaning that theres a race between the shell command using the socket and it being torn down.Changing
connect_to_device_socket
so it uses its parents reslist, effectively postponing the teardown till the command has run