Skip to content

topl-service / io.matthewnelson.topl_service / TorServiceController / Builder / addTimeToStopServiceDelay

addTimeToStopServiceDelay

fun addTimeToStopServiceDelay(milliseconds:Long): Builder (source)

Default is set to 100ms (what this method adds time to).

A slight delay is required when starting and stopping Tor to allow the Process for which it is running in to settle. This method adds time to the cautionary delay between execution of stopping Tor and stopping TorService.

The call to stopTor executes individual commands to:

  • stop tor + delay (300ms)
  • delay (100ms) <---------------------- what this method will add to
  • stop service

Parameters

milliseconds - A value greater than 0

See Also

io.matthewnelson.topl_service.service.components.actions.ServiceAction.Stop

io.matthewnelson.topl_service.service.components.actions.ServiceActionProcessor.processServiceAction