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