From 722a67a91032f90491126a72e7ac6b8f4c11059c Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Mon, 10 Feb 2014 08:39:20 -0600 Subject: [PATCH] add message payload size reservation --- websocketpp/processors/hybi13.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/websocketpp/processors/hybi13.hpp b/websocketpp/processors/hybi13.hpp index 14b2d3fa9d..92a4e2ea70 100644 --- a/websocketpp/processors/hybi13.hpp +++ b/websocketpp/processors/hybi13.hpp @@ -396,7 +396,8 @@ public: m_extended_header ) ); - // TODO: reserve space in the existing message for the new bytes + + out.reserve(out.size() + m_bytes_needed); } m_current_msg = &m_data_msg; }