WebSocket-for-Python icon indicating copy to clipboard operation
WebSocket-for-Python copied to clipboard

Will crash if sec-websocket-protocol has only one value

Open zexee opened this issue 8 years ago • 0 comments

https://github.com/Lawouach/WebSocket-for-Python/blob/cdf50bdc373154a6388a7434b0dda363ab2ea8b5/ws4py/client/init.py#L336

I don't know much about websocket but when use this to connect libwebsocket-based server, it will crash, and the error comes from this line. The value is b'ws'. Simply change this line to protocols = value, and it works fine.

zexee avatar Oct 13 '17 08:10 zexee