From 10ef758211f9c5a2ad733776781fd84377047bc4 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 22 Sep 2018 21:37:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/WebSocketSplitter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Http/WebSocketSplitter.cpp b/src/Http/WebSocketSplitter.cpp index 81896979..851fbaf4 100644 --- a/src/Http/WebSocketSplitter.cpp +++ b/src/Http/WebSocketSplitter.cpp @@ -104,10 +104,10 @@ begin_decode: if(remain - playload_slice_len > 0){ string nextPacket((char *)ptr + playload_slice_len,remain - playload_slice_len); _got_header = false; - _remain_data.clear(); + _remain_data = nextPacket; - data = ptr = (uint8_t *)nextPacket.data(); - len = nextPacket.size(); + data = ptr = (uint8_t *)_remain_data.data(); + len = _remain_data.size(); goto begin_decode; } else{ _got_header = false;