Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove check for msg_serial when converting protocol message to JSON
This check is currently failing when calling as_json on an incoming MESSAGE protocol message — for example, in the case where you receive a message whilst using debug-level logging. I’m not sure what was the intention of this check, which dates back to 523a4b1 (there, the error message is "(…) cannot generate valid JSON for ProtocolMessage"). It’s not clear to me why a msgSerial would be required in order to serialise a protocol message; I can only guess it was intended as some sort of a business logic sense check on outgoing messages. Perhaps, back then, it was the case that incoming MESSAGE protocol messages contained a msgSerial, hence causing this check to succeed, but this is certainly no longer the case (even on protocol v1), nor can I see any good reason why it should be. Until aaa6211, this check could be (and was) satisfied by the presence of the connectionSerial attribute in the protocol message. That commit removed all references to connectionSerial and hence this check started failing. Given that there doesn’t seem to be a good reason for this check, remove it and hope that it wasn’t doing anything important. Resolves #436.
- Loading branch information