diff --git a/src/utils/stream.c b/src/utils/stream.c index 8124c12..9972598 100644 --- a/src/utils/stream.c +++ b/src/utils/stream.c @@ -20,8 +20,6 @@ void stream_destruct(stream_T* stream) { memory_free(stream); } -#include "utils/logger.h" - uint32_t stream_write(stream_T* stream, void* buffer_in, uint32_t n) { uint32_t num_top; uint32_t num_bottom; @@ -43,6 +41,8 @@ uint32_t stream_write(stream_T* stream, void* buffer_in, uint32_t n) { } uint32_t stream_read(stream_T* stream, void* buffer_out, uint32_t n) { + if (stream->pos_sender == stream->pos_receiver) return 0; + uint32_t num_top; uint32_t num_bottom;