Skip to content

Commit

Permalink
add case CURL_SOCKET_BAD
Browse files Browse the repository at this point in the history
  • Loading branch information
usedev committed Oct 20, 2024
1 parent 5a8bd5c commit ed5c6ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion curl_cffi/requests/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ed5c6ad

Please sign in to comment.