js_stream: fix buffer index in DoWrite
authorShigeki Ohtsu <ohtsu@iij.ad.jp>
Wed, 6 May 2015 04:45:46 +0000 (13:45 +0900)
committerFedor Indutny <fedor@indutny.com>
Wed, 6 May 2015 13:30:07 +0000 (16:30 +0300)
commit6ccbe75384d34faed30a679fcce31e4996709771
treebfab968c678455f062a379d032485716e8eb8dd7
parentb712af79a719b79e9c060bf4df54571e11870914
js_stream: fix buffer index in DoWrite

The index of buffer to write in JSStream was always 0 by mistake. This
fix was to use increment index of buffer arrays.
The test was originally made by Brian White in #1594.

Fix: https://github.com/iojs/io.js/issues/1595
Fix: https://github.com/iojs/io.js/pull/1594
PR-URL: https://github.com/iojs/io.js/pull/1635
Reviewed-By: Fedor Indutny <fedor@indutny.com>
src/js_stream.cc
test/parallel/test-tls-connect-stream-writes.js [new file with mode: 0644]