From 39b61175c1946e01785963bacb95cef05d449f90 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 29 Nov 2011 23:48:53 +0100 Subject: [PATCH] connection::thread_loop(): Try different way to append to in_buf We have seen mysterious crashes. --- connection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.cc b/connection.cc index 8666996..7963765 100644 --- a/connection.cc +++ b/connection.cc @@ -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)