-
Notifications
You must be signed in to change notification settings - Fork 772
Description
If you exceed the websocket payload limit when issuing an RPC call in WAMP it drops the connection and fails with 'WAMP transport was lost without closing the session before'. Turning on debug logging shows that it is an 1009 error on the other end, but it took me some time to get there - I think it would be great with a more detailed main error.
That said, in my case at least, I prefer it much to detect the error on the client side to avoid dropping the connection. For now I have solved it by adding the following to autobahn.wamp.websocket.WampWebSocketProtocol.send:
if len(payload) > self.maxFramePayloadSize:
raise ProtocolError(u'Message exceeds payload limit of {0}'.format(self.maxFramePayloadSize))
self.sendMessage(payload, isBinary)
maybe that would be of general interest?