abcore
abcore copied to clipboard
Avoid infinite loop if daemon is not responding.
After some tests I found 2 sources of issues.
1 - If the daemon stops and after that the RPC gets a stop command, it enters an infinite loop of calling stop @greenaddress do you know why this loop was introduced? Is it really necessary?
2 - getNetworkInfo() might get stuck, causing the Service also get stuck and to not respond to new requests. I still need to investigate this one better so I just added a TODO for now.
Issue 2 is being addressed in #108
@udiWertheimer start here plz =P
nit: in the stop case, status label is updated to "STOPPED" but switch is still ON, is it right?
if I try to swift OFF, in the log: E/com.greenaddress.abcore.RPCIntentService: daemon not responding, already stopped
Not right per say, but if I toggle the switch to OFF it triggers the logic to tell the daemon to stop again. I thought best to have this and #108 fixed before changing the logic in the MainActivity.
ack 932175ebec227869590c15f67d500b686b8e65ac