python - tornado websocket closing on server-side -


i have connection websocket handler in tornado app, , when try close on server-side, unexpected event code not equal 1 i've specified in closing parameters

handler's method code:

def on_message(self, message):     # stuff     self.close(code=200) 

on client-side expect onclose_event.code 200 appears 1006, there correct way close websocket connection 'clearly' specified code in tornado?

tornado version use 4.1

can try tornado 4.2? handling of close codes changed in version, although i'm not sure if fix problem or not.

from 4.2 release notes: "when other side closes connection, echo received close code instead of sending empty close frame."


Comments