Skip to content

Commit d88da94

Browse files
committed
Check that there is a plugin to disable before we try to shutdown.
1 parent cfaf332 commit d88da94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ async def start_plugin(plugin_name: str, port: int = None, min_port: int = 1001,
245245
memory_func = mac_gpu_memory
246246

247247
available_memory = memory_func()
248-
if available_memory >= 0:
248+
if available_memory >= 0 and len(most_recent_use) > 0:
249249
if plugin_name in plugin_memory.keys():
250250
while plugin_memory[plugin_name] > available_memory and len(most_recent_use) > 0:
251251
plugin_to_shutdown = most_recent_use.pop()

0 commit comments

Comments
 (0)