Fixed failing websocket SSL reads.

This commit is contained in:
Marat Fayzullin 2024-08-31 20:11:31 -04:00
parent c794ad433b
commit 1a04f95d18
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import select
import threading
from abc import ABC, abstractmethod
from datetime import datetime
from ssl import SSLWantReadError
import logging
@ -246,6 +247,8 @@ class WebSocketConnection(object):
logger.warning("unsupported opcode: {0}".format(opcode))
except Drained:
available = False
except SSLWantReadError:
available = False
except IncompleteRead:
logger.warning("incomplete read on websocket; closing connection")
self.socketError = True