aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-08 23:39:37 +0100
committerDavid Robillard <d@drobilla.net>2019-04-13 19:48:23 +0200
commit65fbd3c8e9cbe78d1a342acd442019a010b058c2 (patch)
tree7b61e9d238849d8595d6bc0673028e5001c7c7fd /src
parenta3695dd1e422bd3e3b22b1ad78a4a0a59b34507c (diff)
downloadserd-65fbd3c8e9cbe78d1a342acd442019a010b058c2.tar.gz
serd-65fbd3c8e9cbe78d1a342acd442019a010b058c2.tar.bz2
serd-65fbd3c8e9cbe78d1a342acd442019a010b058c2.zip
Fix reading from socket-like streams and add test
Diffstat (limited to 'src')
-rw-r--r--src/byte_source.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/byte_source.h b/src/byte_source.h
index 4dfff70f..c12ab778 100644
--- a/src/byte_source.h
+++ b/src/byte_source.h
@@ -89,10 +89,10 @@ serd_byte_source_advance(SerdByteSource* source)
if (source->from_stream) {
if (source->page_size > 1) {
if (++source->read_head == source->page_size) {
- source->eof = false;
st = serd_byte_source_page(source);
}
} else {
+ source->eof = false;
if (!source->read_func(&source->read_byte, 1, 1, source->stream)) {
source->eof = true;
st = source->error_func(source->stream) ? SERD_ERR_UNKNOWN