From 8bc8216611cfcf0469d803812da15d475f3e9e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Mon, 15 Jan 2024 11:24:32 +0100 Subject: [PATCH] raise exception when ffi_client.request returns INVALID_HANDLE --- livekit-rtc/livekit/rtc/_ffi_client.py | 1 + 1 file changed, 1 insertion(+) 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()