SC2: don't close all SC2 instances when one quits (#3507)
This commit is contained in:
		| @@ -28,6 +28,11 @@ class kill_switch: | ||||
|         logger.debug("kill_switch: Add switch") | ||||
|         cls._to_kill.append(value) | ||||
|  | ||||
|     @classmethod | ||||
|     def kill(cls, value): | ||||
|         logger.info(f"kill_switch: Process cleanup for 1 process") | ||||
|         value._clean(verbose=False) | ||||
|  | ||||
|     @classmethod | ||||
|     def kill_all(cls): | ||||
|         logger.info(f"kill_switch: Process cleanup for {len(cls._to_kill)} processes") | ||||
| @@ -116,7 +121,7 @@ class SC2Process: | ||||
|     async def __aexit__(self, *args): | ||||
|         logger.exception("async exit") | ||||
|         await self._close_connection() | ||||
|         kill_switch.kill_all() | ||||
|         kill_switch.kill(self) | ||||
|         signal.signal(signal.SIGINT, signal.SIG_DFL) | ||||
|  | ||||
|     @property | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Dill
					Fabian Dill