Skip to content

Reset decoder before decoding in generated DictionaryDecoder #511

@0x26res

Description

@0x26res

In the generated DictionaryDecoder, I've noticed that reset is called after the message is processed.

But if the acceptor or the decoder was to throw an exception, it will put the decoder in a bad state, the next time a same message comes in.

I think it should be reset before.

        else if (messageType == RejectDecoder.MESSAGE_TYPE)
        {
            reject.decode(buffer, offset, length);
            acceptor.onReject(reject);
            reject.reset();
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions