Summary:
Changelog: Fixed an issue where Android logs would get stuck
Our adb and rsocket connection are fundamentally unstable; every now and then it looses connection (at least on my machine). This happens both for emulators and real devices.
If the logcat connection closes, it isn't restarted, so occassionaly the the logs would get 'stuck'. Fixed it by automatically restarting the stream if the close wasn't intentional.
Investigated the stack of the disconnects, but it isn't caused on our end, the closures originate from (R)socket itself, so this band aid seems unavoidable.
Using a near-zero timeout does work as well. Gave it a 100ms grace time though, in case starvation is a factor in the original problem. This might cause a few messages to be missed though, but it doesn't seem to happen to often (every few minutes in my case)
Reviewed By: passy
Differential Revision: D28095802
fbshipit-source-id: f22336ad46c04a3d886ff9dbc4d787591ac75eea