abcore icon indicating copy to clipboard operation
abcore copied to clipboard

Avoid infinite loop if daemon is not responding.

Open caiofaustino opened this issue 5 years ago • 5 comments

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.

caiofaustino avatar Dec 20 '19 00:12 caiofaustino

Issue 2 is being addressed in #108

caiofaustino avatar Dec 24 '19 13:12 caiofaustino

@udiWertheimer start here plz =P

caiofaustino avatar Jan 18 '20 21:01 caiofaustino

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

lvaccaro avatar Jan 19 '20 17:01 lvaccaro

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.

caiofaustino avatar Jan 19 '20 17:01 caiofaustino

ack 932175ebec227869590c15f67d500b686b8e65ac

lvaccaro avatar Jan 19 '20 23:01 lvaccaro