Open bigbearzhu opened 7 years ago
Actually all connections need to terminate upon a serialization error (and a few other errors).
For now we should mimic the JSON/text behavior. I'll try to make serialization exceptions terminate the connection in a future release.
Elad
You mean swallow it like in MethodInfoSubscriber.InnerEvent?
On 2 Mar 2017, at 5:28 pm, Elad Zelingher notifications@github.com wrote:
Actually all connections need to terminate upon a serialization error (and a few other errors).
For now we should mimic the JSON/text behavior. I'll try to make serialization exceptions terminate the connection in a future release.
Elad
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I'm sorry, I misread the issue. I thought only the binary version has the issue.
In this case, I think we should catch the exception and close the connection. It would be even better to send a protocol violation error code (1002).
See also here https://github.com/crossbario/autobahn-python/blob/ea4842090a03cf57c09eb0c34359cff4d3cc2b44/autobahn/wamp/websocket.py#L100 .
The only problem is that this requires changes to all WampConnection classes which makes it a harder task.
Elad
This is the stack trace. The JTokenMessageParser.Parse does capture exception and log it, and, rethrow it. However, the callers to the function don't capture the exception and handle it. So it would end up as unhandled and crash the process. Would you think
WebSocket4NetTextConnection.OnMessageReceived
should capture exception and swallow it? Same thing happens onWebSocket4NetBinaryConnection.OnDataReceived
. Thanks.