diff --git a/livekit-rtc/livekit/rtc/_ffi_client.py b/livekit-rtc/livekit/rtc/_ffi_client.py index 91166bae..dfeb8e0f 100644 --- a/livekit-rtc/livekit/rtc/_ffi_client.py +++ b/livekit-rtc/livekit/rtc/_ffi_client.py @@ -193,6 +193,7 @@ def request(self, req: proto_ffi.FfiRequest) -> proto_ffi.FfiResponse: handle = ffi_lib.livekit_ffi_request( data, proto_len, ctypes.byref(resp_ptr), ctypes.byref(resp_len) ) + assert handle != INVALID_HANDLE resp_data = bytes(resp_ptr[: resp_len.value]) resp = proto_ffi.FfiResponse()