Commit 0b597ab0 authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Force remove after stop because of threading problem

parent d891c097
Pipeline #3786 canceled with stages
......@@ -4,15 +4,16 @@ import .. / .. / cores / handle_killapps
import .. / ansurf_objects
import .. / widgets / tor_status_widget
let cb_kill_apps = init_gtk_askkill()
# proc do_anonsurf_start(cb_send_msg: proc) {.gcsafe.} =
# ansurf_acts_handle_start("gksudo", cb_kill_apps, cb_send_msg)
proc do_anonsurf_start(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_start("gksudo", cb_send_msg)
# proc do_anonsurf_stop(cb_send_msg: proc) {.gcsafe.} =
# ansurf_acts_handle_stop("gksudo", cb_kill_apps, cb_send_msg)
proc do_anonsurf_stop(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_stop("gksudo", cb_send_msg)
proc do_anonsurf_restart(cb_send_msg: proc) {.gcsafe.} =
......@@ -29,17 +30,15 @@ proc do_anonsurf_checkip(cb_send_msg: proc) {.gcsafe.} =
proc ansurf_gtk_do_start_stop*(b: Button, cb_send_msg: proc) =
if b.label == "Start":
# createThread(ansurf_workers_common, do_anonsurf_start, cb_send_msg)
ansurf_acts_handle_start("gksudo", cb_kill_apps, cb_send_msg)
cb_kill_apps(cb_send_msg)
createThread(ansurf_workers_common, do_anonsurf_start, cb_send_msg)
else:
# createThread(ansurf_workers_common, do_anonsurf_stop, cb_send_msg)
ansurf_acts_handle_stop("gksudo", cb_kill_apps, cb_send_msg)
# joinThread(ansurf_workers_common)
createThread(ansurf_workers_common, do_anonsurf_stop, cb_send_msg)
cb_kill_apps(cb_send_msg)
proc ansurf_gtk_do_restart*(b: Button, cb_send_msg: proc) =
createThread(ansurf_workers_common, do_anonsurf_restart, cb_send_msg)
# ansurf_workers_common.joinThread()
proc ansurf_gtk_do_myip*(b: Button, cb_send_msg: 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