Commit 5fce50d4 authored by Stanislav Bohm's avatar Stanislav Bohm

FIX: Fixed socket streaming

parent 9817de25
......@@ -138,6 +138,7 @@ void Socket::_on_read(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
socket->on_stream_data(data, socket->stream_remaining, 0);
assert(buffer.size() == 0);
char *start_data = data + socket->stream_remaining;
socket->stream_remaining = 0;
buffer.insert(buffer.begin(), start_data, data + size_read);
} else {
buffer.insert(buffer.end(), data, data + size_read);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment