buffering if we read less than 256 bytes at a time.
if (!NILP (p->adaptive_read_buffering))
{
int delay = XINT (p->read_output_delay);
- if (nbytes < readmax - carryover)
+ if (nbytes < 256)
{
if (delay < READ_OUTPUT_DELAY_MAX_MAX)
{
delay += READ_OUTPUT_DELAY_INCREMENT * 2;
}
}
- else if (delay > 0)
+ else if (delay > 0 && (nbytes == readmax - carryover))
{
delay -= READ_OUTPUT_DELAY_INCREMENT;
if (delay == 0)