chenzihong commited on
Commit
cb4ee7d
·
1 Parent(s): a783fe6

fix(lightrag): use is_closed() instead of _closed

Browse files
Files changed (1) hide show
  1. lightrag/lightrag.py +1 -1
lightrag/lightrag.py CHANGED
@@ -68,7 +68,7 @@ def always_get_an_event_loop() -> asyncio.AbstractEventLoop:
68
  try:
69
  # Try to get the current event loop
70
  current_loop = asyncio.get_event_loop()
71
- if current_loop._closed:
72
  raise RuntimeError("Event loop is closed.")
73
  return current_loop
74
 
 
68
  try:
69
  # Try to get the current event loop
70
  current_loop = asyncio.get_event_loop()
71
+ if current_loop.is_closed():
72
  raise RuntimeError("Event loop is closed.")
73
  return current_loop
74