Commit b942e2f0 authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Only ask kill apps if anonsurf stopped okay

parent 09df2b70
......@@ -47,12 +47,14 @@ proc ansurf_acts_handle_stop*(sudo: string, callback_kill_apps, callback_send_me
callback_send_messages("AnonSurf Status", "AnonSurf is not running. Can't stop it", 2)
return
if ansurf_core_stop(sudo) == 0:
let stop_status = ansurf_core_stop(sudo)
if stop_status == 0:
callback_send_messages("AnonSurf Stop", "AnonSurf stopped", 0)
callback_kill_apps(callback_send_messages)
elif stop_status == 255:
discard
else:
callback_send_messages("AnonSurf Stop", "AnonSurf failed to stop", 2)
callback_kill_apps(callback_send_messages)
proc ansurf_acts_handle_restart*(sudo: string, callback_send_messages: proc) =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment