guardianproject / guardianproject/tor-android
add control port buffer so setEvents() can be called anytime
- Dominant language
- Java
- Stars
- 286
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
I just had an idea that I think will cover this issue, be relatively easy to implement, and replace this pull request:
* accept setEvents() calls any time
* if the control port is not active, cache the value of last setEvents() call
* after TorService receives the first CIRC event, send the cached setEvents() value
* further setEvents() calls are sent directly to the control port
* this buffer should probably be a queue that stores all recieved messages in order and replays them
* when TorService sends `STOPPING` and `OFF`, the queue should be cleared.
This should allow setEvents() calls to work any time.
@n8fr8 @bitmold Should it queue events when it is `OFF`? Or only when `STARTING`?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.