Skip to content

Commit

Permalink
* don't lose the reference to the client instance so we can call it a…
Browse files Browse the repository at this point in the history
…gain and let it do the "hard-exit" when receiving more than one signal

* don't log a full stacktrace when SetConsoleCtrlHandler fails

git-svn-id: https://xpra.org/svn/Xpra/trunk@9335 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 13, 2015
1 parent ee39549 commit 62fd63f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/xpra/platform/win32/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def cleanup(self):
el = get_win32_event_listener(False)
if el:
el.cleanup()
self.client = None
#self.client = None

def activateapp(self, wParam, lParam):
log("WM_ACTIVATEAPP: %s/%s client=%s", wParam, lParam, self.client)
Expand All @@ -539,10 +539,11 @@ def setup_console_event_listener(self, enable=True):
result = win32api.SetConsoleCtrlHandler(self.handle_console_event, int(enable))
if result == 0:
log.error("could not SetConsoleCtrlHandler (error %r)", win32api.GetLastError())
except:
log.error("SetConsoleCtrlHandler error", exc_info=True)
result = 0
return result!=0
return False
return True
except Exception as e:
log.error("SetConsoleCtrlHandler error: %s", e)
return False


def handle_console_event(self, event):
Expand Down

0 comments on commit 62fd63f

Please sign in to comment.