Lawouach / WebSocket-for-Python

WebSocket client and server library for Python 2 and 3 as well as PyPy (ws4py 0.5.1)
https://ws4py.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
1.12k stars 288 forks source link

ws4py 0.3.5 doesn't receive all messages over wss #191

Closed mpetazzoni closed 7 years ago

mpetazzoni commented 8 years ago

It appears the latest released version of ws4py (0.3.5) does not correctly received all messages sent by the server when communicating over an SSL WebSocket (wss://).

I've confirmed that all messages are correctly received with 0.3.4 regardless of whether I use SSL or not, but when switching to 0.3.5, I only get all messages when using a insecure connection. As soon as I try to use a secured WebSocket with 0.3.5, the client seems to not be received a vast majority of the messages sent by the server.

For now the only workaround seems to be to stick with 0.3.4.

Let me know if you need more details or if you're unable to reproduce the problem on your side.

tito commented 7 years ago

Hi maxime! Long time no see :)

I believe this is fixed in master, as we now read as much as we can from the ssl socket using "pending" data. You should not have the issue anymore. A release will be out soon with the fixes.

mpetazzoni commented 7 years ago

Aha, funny to run into each other like this. I just saw the epic amount of work you just dropped into this repo: amazing!

Looking forward to seeing 0.4.0 out there and updating my requirements.txt! Care to ping me on this issue when it's out on PyPI?

tito commented 7 years ago

@mpetazzoni It's out on Pypi: 0.4.1 :)