05nelsonm / kmp-tor

Kotlin Multiplatform Library for embedding Tor into your applications
Apache License 2.0
33 stars 5 forks source link

Irrecoverable state on start failure #394

Closed 05nelsonm closed 4 months ago

05nelsonm commented 4 months ago

If start or restart fails, the temporary command queue should be destroyed. Currently, only a restart failure will call lifecycle.destroy if it is present (A service).

I think the simplest solution would be to add a invokeOnCompletion handle whereby upon start/restart failure, if the actionStack is empty, to enqueue StopDaemon so the processor loops again and shuts down.