diff --git a/curl_cffi/requests/websockets.py b/curl_cffi/requests/websockets.py index c5c22ff..d112122 100644 --- a/curl_cffi/requests/websockets.py +++ b/curl_cffi/requests/websockets.py @@ -577,7 +577,7 @@ async def recv(self, *, timeout: Optional[float] = None) -> Tuple[bytes, int]: chunks = [] flags = 0 - sock_fd = loop.run_in_executor(None, self.curl.getinfo, CurlInfo.ACTIVESOCKET) + sock_fd = await loop.run_in_executor(None, self.curl.getinfo, CurlInfo.ACTIVESOCKET) if sock_fd == CURL_SOCKET_BAD: raise WebSocketError("Invalid active socket", CurlECode.NO_CONNECTION_AVAILABLE) while True: