Fix SSL websocket
This commit is contained in:
parent
43a7886eae
commit
9e2668e6da
1 changed files with 7 additions and 3 deletions
|
@ -390,6 +390,9 @@ class WebSocket(object):
|
||||||
self._frame_mask = None
|
self._frame_mask = None
|
||||||
self._cont_data = None
|
self._cont_data = None
|
||||||
|
|
||||||
|
# Do not allow simultaneous send - leads to SSL issues!
|
||||||
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
def fileno(self):
|
def fileno(self):
|
||||||
return self.sock.fileno()
|
return self.sock.fileno()
|
||||||
|
|
||||||
|
@ -565,6 +568,7 @@ class WebSocket(object):
|
||||||
length = len(data)
|
length = len(data)
|
||||||
if traceEnabled:
|
if traceEnabled:
|
||||||
logger.debug("send: " + repr(data))
|
logger.debug("send: " + repr(data))
|
||||||
|
with self.lock:
|
||||||
while data:
|
while data:
|
||||||
l = self._send(data)
|
l = self._send(data)
|
||||||
data = data[l:]
|
data = data[l:]
|
||||||
|
|
Loading…
Reference in a new issue