Nick Jennings
unread,Jul 19, 2012, 8:55:00 AM7/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-...@googlegroups.com
Hi All,
I've got a strange problem that I can't quite put my finger on, was
wondering if anyone had any experience with this.
I've got a flash front-end, using websocets. It seems like once in a
while, the flash app looses connection and tries to reconnect, this is
what happens on the server:
(the printed message 'unregistered client' is printed when the
'on_close()' method is called)
unregistered client
ListenHandler __init__
ERROR:root:Uncaught exception, closing connection.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py",
line 262, in _on_headers
self.request_callback(self._request)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line
1412, in __call__
handler._execute(transforms, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 123, in _execute
self.ws_connection.accept_connection()
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 458, in accept_connection
self._accept_connection()
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 497, in _accept_connection
"\r\n" % (self._challenge_response(), subprotocol_header)))
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 196, in write
self._check_closed()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 564, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
ERROR:root:Exception in callback
<tornado.stack_context._StackContextWrapper object at 0x7ffd3c12c6d8>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py",
line 421, in _run_callback
callback()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 304, in wrapper
callback(*args)
File "/usr/local/lib/python2.7/dist-packages/tornado/httpserver.py",
line 262, in _on_headers
self.request_callback(self._request)
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line
1412, in __call__
handler._execute(transforms, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 123, in _execute
self.ws_connection.accept_connection()
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 458, in accept_connection
self._accept_connection()
File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py",
line 497, in _accept_connection
"\r\n" % (self._challenge_response(), subprotocol_header)))
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 196, in write
self._check_closed()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py",
line 564, in _check_closed
raise IOError("Stream is closed")
IOError: Stream is closed
It seems like the flash client is disconnection (on_close()) but then
immediately trying to communicate on the same stream? Is this
possible? How can I gracefully handle these situations so it doesn't
bring down the socket server?
Thanks for any help!
-Nick