There seems to be a problem handling disconnection of clients properly which causes an infinite error loop on the proxy server.
In order to reproduce:
Start the proxy server
Start a basic proxy client configuration (i.e.: this one)
Open test.html in a browser
Wait a minute, make sure the test it working
Close the browser
You will notice the proxy server starts printing endlessly:
...
AttributeError: 'NoneType' object has no attribute 'write_message'
Unexpected error: <type 'exceptions.AttributeError'>
Traceback (most recent call last):
File "main.py", line 127, in on_message
self.pass_message(msg, clients)
File "main.py", line 209, in pass_message
client.ws_conns[-1].write_message(message)
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py", line 165, in write_message
self.ws_connection.write_message(message, binary=binary)
AttributeError: 'NoneType' object has no attribute 'write_message'
Unexpected error: <type 'exceptions.AttributeError'>
Traceback (most recent call last):
File "main.py", line 127, in on_message
self.pass_message(msg, clients)
File "main.py", line 209, in pass_message
client.ws_conns[-1].write_message(message)
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py", line 165, in write_message
self.ws_connection.write_message(message, binary=binary)
...
There seems to be a problem handling disconnection of clients properly which causes an infinite error loop on the proxy server.
In order to reproduce:
You will notice the proxy server starts printing endlessly: