summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--relay.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/relay.c b/relay.c
index 5de5cb4..ba6b95a 100644
--- a/relay.c
+++ b/relay.c
@@ -130,6 +130,9 @@ static void relay_read_cb(struct ustream *s, int bytes)
}
buf = ustream_get_read_buf(s, &len);
+ if (!buf || !len)
+ return;
+
uh_chunk_write(cl, buf, len);
ustream_consume(s, len);
}