Skip to content

AbstractParser refillBuffer logic ends parsing before it is ready #7

@ghost

Description

AbstractParser's logic used to determine if the read buffer needs to be refilled AND the refillBuffer operations overload the use of "running" and can lead to parse operations ending prematurely.

There exist two situations to watch for:

  1. Have we exhausted the input source (e.g. stream), if so during a refill buffer, don't read from it.
  2. Has stop() been called, if so, exit the parse method.

Right now when -1 is encountered from the refillBuffer, state is changed to stopped right away when there may be remaining bytes in the buffer, especially when the refillBufferThreshold value is very high and causes frequent refill requests while a lot of data may remain in the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions