Don't try to shutdown a not running API (#543)
This commit is contained in:
parent
75d24ba534
commit
44ae9c7b63
|
@ -243,5 +243,9 @@ class RestAPI(CoreSysAttributes):
|
|||
|
||||
async def stop(self):
|
||||
"""Stop rest api webserver."""
|
||||
if not self._site:
|
||||
return
|
||||
|
||||
# Shutdown running API
|
||||
await self._site.stop()
|
||||
await self._runner.cleanup()
|
||||
|
|
Loading…
Reference in New Issue