By marking EOS on the outgoing queue we allow the sender to flush
pending data if that's possible.
This also fixes a typo in the condition for eos_mark, it operates on
outgoing, not incoming queue.
EINA_SAFETY_ON_TRUE_RETURN_VAL(pd->closed, EINVAL);
+ if (pd->outgoing)
+ {
+ efl_io_queue_eos_mark(pd->outgoing);
+ efl_io_copier_flush(pd->sender, EINA_FALSE, EINA_TRUE);
+ }
+
/* line delimiters may be holding a last chunk of data */
if (pd->receiver) efl_io_copier_flush(pd->receiver, EINA_FALSE, EINA_TRUE);
EOLIAN static void
_efl_io_buffered_stream_eos_mark(Eo *o, Efl_Io_Buffered_Stream_Data *pd)
{
- if (!pd->incoming) return;
+ if (!pd->outgoing) return;
DBG("%p mark eos", o);
efl_io_queue_eos_mark(pd->outgoing);
}