Problems after upgrading to latest tornado and sockjs-tornado#67
Problems after upgrading to latest tornado and sockjs-tornado#67dimabxsx wants to merge 4 commits intomrjoes:masterfrom
Conversation
|
First issue probably solved by 7153769. |
|
No, problem with websockets still not solved.It can be reproduced by sending unexpected values in By the way, is there any reasons to override this method? Both |
|
Can confirm the bug in issue 1 above still exists for anyone using Tornado >=4.0. Unfortunately I think @dimabxsx's proposal is a breaking change for anyone still using 3.2 (or lower, god forbid...). The checks for I don't know of a clean way of supporting both versions, so this may just mean a hard dependency on 3.2 here. |
|
Only reason why _execute() was overridden - there are client-side SockJS tests and sockjs-tornado had to be compliant. Older Tornado versions didn't have this checking logic in place. Second issue - not sure what's going on. Will try to troubleshoot. Most likely caused by some additional checks in Tornado or sockjs-tornado to send something to the client on closed connection. |
|
The second issue is caused by closing the connection from within def do_close(self):
self.close()
def on_open(self, data):
...
IOLoop.current().add_callback(self.do_close) |
After switching to the latest tornado and sockjs-tornado stuck with this exceptions.
First one comes from
SockJSWebSocketHandler._executeCan't reproduce this. Checking
self.streamvalue beforewriteandclosedo the job, but i'm not sure it's a good solution.Second one is related to xhr-polling transport.
Caused by calling
SockJSConnection.closewhen using xhr-polling.Can be reproduced in chat example.
self.close()call somewhere inChatConnection.on_messageWhen
closewill be called, you'll get same exception.