File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,22 @@ async def aenter(self) -> None:
6262 await self .server .activate ()
6363
6464 # ----------------------------------------------------------------------------------------
65- async def aexit (self , type , value , traceback ) -> None :
65+ async def aexit (self , type = None , value = None , traceback = None ) :
6666 """
6767 Asyncio context exit.
6868
6969 Stop service if one was started and releases any client resources.
7070 """
7171
72+ logger .debug (f"[DISSHU] { thing_type } aexit" )
73+
7274 if self .server is not None :
7375 if self .context_specification .get ("start_as" ) == "process" :
74- # Put in request to shutdown the server.
75- await self .server .client_shutdown ()
76+ # The server associated with this context is running?
77+ if await self .is_process_alive ():
78+ logger .debug (f"[DISSHU] { thing_type } calling client_shutdown" )
79+ # Put in request to shutdown the server.
80+ await self .server .client_shutdown ()
7681
7782 if self .context_specification .get ("start_as" ) == "coro" :
7883 await self .server .direct_shutdown ()
You can’t perform that action at this time.
0 commit comments