Set internal state correctly when writing frames:

fix #300

Correctly set wr_.cont when performing synchronous frame
writes, for the case where masking and autofragment are used.
This commit is contained in:
Vinnie Falco
2017-04-14 19:15:33 -07:00
parent 6ec2e10c77
commit aa24a9c749
2 changed files with 8 additions and 0 deletions

View File

@ -1,7 +1,14 @@
1.0.0-b33
* Require Visual Studio 2015 Update 3 or later
HTTP
* Use fwrite return value in file_body
WebSocket
* Set internal state correctly when writing frames
* Add decorator unit test
* Add write_frames unit test

View File

@ -770,6 +770,7 @@ write_frame(bool fin,
fh.len = n;
remain -= n;
fh.fin = fin ? remain == 0 : false;
wr_.cont = ! fh.fin;
detail::fh_streambuf fh_buf;
detail::write<static_streambuf>(fh_buf, fh);
boost::asio::write(stream_,