connection::thread_loop(): Try different way to append to in_buf

We have seen mysterious crashes.
This commit is contained in:
Petr Baudis 2011-11-29 23:48:53 +01:00
parent 430a149a64
commit 39b61175c1

View file

@ -201,7 +201,7 @@ connection::thread_loop(void)
} else {
bool want_moar = false;
pthread_mutex_lock(&buf_lock);
in_buf.append(cbuf, len);
in_buf += std::string(cbuf, len);
want_moar = buf_incomplete(in_buf);
pthread_mutex_unlock(&buf_lock);
if (!want_moar)