dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

ssl connection crashed on python 2.7 #52

Closed xianzhaowang closed 7 years ago

xianzhaowang commented 7 years ago

once click the connection with ssl enabled(wss), the example crash like

python SimpleExampleServer.py --example chat --ssl 1 --cert ./cert.pem Traceback (most recent call last): File "SimpleExampleServer.py", line 71, in server.serveforever() File "/root/kw/wss/SimpleWebSocketServer.py", line 696, in serveforever super(SimpleSSLWebSocketServer, self).serveforever() File "/root/kw/wss/SimpleWebSocketServer.py", line 654, in serveforever client.handleClose() File "SimpleExampleServer.py", line 38, in handleClose clients.remove(self) ValueError: list.remove(x): x not in list

dpallot commented 7 years ago

Thanks for that. I changed it so we only call handleClose if we have a successful handshake.

xianzhaowang commented 7 years ago

Thanks Dave for your response. May I know any reason for the negotiation failure?

On Wed, Apr 12, 2017 at 10:53 PM, Dave notifications@github.com wrote:

Thanks for that. I changed it so we only call handleClose if we have a successful handshake.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dpallot/simple-websocket-server/issues/52#issuecomment-293789115, or mute the thread https://github.com/notifications/unsubscribe-auth/AT2zn3Dv7dGV0oxpmLz_0fcCp4irakk4ks5rvbhDgaJpZM4M6wEG .