At line 112 in '_read' bytes is intended to receive the result from connection.read(length) and in the case of an exception prepend the remote address and raise the exception again. A potential issue can occur in the case that connection.read() fails with an IOError. This can happen when the connection is opened and closed too quickly. I added in a block to catch these exceptions on my local machine:
112 try:
113 bytes = self._request.connection.read(length)
114 except IOError:
115 bytes = False
I'm sure there's a more elegant way to go about handling this properly, but it can cause a TON of useless exceptions to flood the error logs.
Relevant portion of the traceback:
_stream_base.py", line 112, in _read\n bytes = self._request.connection.read(length)\nIOError: web_socket_transfer_data raised exception for /leaguechat: Connection read error\n