Skip to content

Commit

Permalink
fix small issue
Browse files Browse the repository at this point in the history
  • Loading branch information
keepingitneil committed Dec 14, 2023
1 parent 99ea265 commit e8ea5f0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions livekit-rtc/livekit/rtc/_ffi_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,16 @@ def to_python_level(level: proto_ffi.LogLevel.ValueType) -> int:
raise Exception("unreachable")


_ffi_instance: Optional["FfiClient"] = None


class FfiClient:
@classproperty
def instance(self):
if self._instance is None:
self._instance = FfiClient()
return self._instance
global _ffi_instance
if _ffi_instance is None:
_ffi_instance = FfiClient()
return _ffi_instance

def __init__(self) -> None:
self._lock = threading.RLock()
Expand Down

0 comments on commit e8ea5f0

Please sign in to comment.