1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 00:07:14 +03:00

Don't wait for Journal thread on exit

since can cause deadlock.
Fixes #295
This commit is contained in:
Jonathan Harris 2018-03-11 19:52:00 +00:00
parent 2900ea80a3
commit 6237066af6
2 changed files with 2 additions and 4 deletions

View File

@ -873,7 +873,7 @@ if __name__ == "__main__":
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd
SetForegroundWindow = ctypes.windll.user32.SetForegroundWindow
ShowWindow = ctypes.windll.user32.ShowWindow
ShowWindowAsync = ctypes.windll.user32.ShowWindowAsync
def WindowTitle(h):
if h:
@ -888,7 +888,7 @@ if __name__ == "__main__":
cls = ctypes.create_unicode_buffer(257)
if GetClassName(hWnd, cls, 257) and cls.value == 'TkTopLevel' and WindowTitle(hWnd) == applongname and GetProcessHandleFromHwnd(hWnd):
# If GetProcessHandleFromHwnd succeeds then the app is already running as this user
ShowWindow(hWnd, 9) # SW_RESTORE
ShowWindowAsync(hWnd, 9) # SW_RESTORE
SetForegroundWindow(hWnd)
sys.exit(0)
return True

View File

@ -196,8 +196,6 @@ class EDLogs(FileSystemEventHandler):
self.stop()
if self.observer:
self.observer.stop()
if thread:
thread.join()
if self.observer:
self.observer.join()
self.observer = None