def stop_server(self, event=None):
"""
Stops active threads.
:param event: Determines if this is a user initiated stop
:return: None
"""
if event:
LoggerGui.debug("User clicked stop server button")
LoggerGui.debug("Stop server called")
if event and (self.label_wpa_status["text"] in (WpaSupplicant.DISCONNECTED, WpaSupplicant.TERMINATED)
and self.label_backend_status["text"] == DrcSimC.STOPPED):
messagebox.showerror("Stop", "Server is not running.")
return
if self.drc_sim_c:
self.drc_sim_c.stop()
self.drc_sim_c = None
if self.wpa_supplicant:
self.wpa_supplicant.stop()
self.wpa_supplicant = None
self.activate()
评论列表
文章目录