Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 03c9d5c

Browse files
committed
add TODO note for fixing later
1 parent 53a5137 commit 03c9d5c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • topl-service/src/main/java/io/matthewnelson/topl_service/service

topl-service/src/main/java/io/matthewnelson/topl_service/service/TorService.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ internal class TorService: Service() {
205205
* */
206206
private fun executeAction(@ServiceAction action: String) {
207207
scopeMain.launch {
208+
// TODO: Need to think about solution for if start() or stop() hangs due to
209+
// jtorctl's lack of interruption timeout
208210
if (::executeActionJob.isInitialized && executeActionJob.isActive) {
209211
executeActionJob.join()
210212
delay(100L)
@@ -213,8 +215,8 @@ internal class TorService: Service() {
213215
executeActionJob = launch(Dispatchers.IO) {
214216
when (action) {
215217
ServiceAction.ACTION_START -> {
216-
startTor()
217218
isTorStarted = true
219+
startTor()
218220
}
219221
ServiceAction.ACTION_STOP -> {
220222
isTorStarted = false

0 commit comments

Comments
 (0)