Cleanly shutdown workers if session should be interrupted

As discussed in #66
This commit is contained in:
Bruno Oliveira
2016-06-07 19:35:08 -03:00
parent 4fc9cb6e99
commit 305acdd72a

View File

@@ -535,6 +535,7 @@ class DSession:
while not self.session_finished:
self.loop_once()
if self.shouldstop:
self.triggershutdown()
raise Interrupted(str(self.shouldstop))
return True