From ed5c6ad55d26da3bc681bed0ddce55bb32ba610b Mon Sep 17 00:00:00 2001 From: usedev Date: Sun, 20 Oct 2024 10:21:47 +0800 Subject: [PATCH] add case CURL_SOCKET_BAD --- curl_cffi/requests/websockets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curl_cffi/requests/websockets.py b/curl_cffi/requests/websockets.py index 5563ec1..1ddbf2e 100644 --- a/curl_cffi/requests/websockets.py +++ b/curl_cffi/requests/websockets.py @@ -70,7 +70,7 @@ def recv(self) -> Tuple[bytes, int]: sock_fd = self.curl.getinfo(CurlInfo.ACTIVESOCKET) if sock_fd == CURL_SOCKET_BAD: raise WebSocketError( - "Invalid close code", WsCloseCode.ABNORMAL_CLOSURE + "Invalid active socket", CurlECode.NO_CONNECTION_AVAILABLE ) while True: try: