Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Internal Buffers when appending another BufferList #27

Closed
wants to merge 2 commits into from

Conversation

mcollina
Copy link
Collaborator

This restores support for node v5.6.0. I think we should release it as a patch upgrade, as the side effects of appending to a nested bl() was a bug anyway.

@rvagg @jcrugzz opinions?

Fixes #26

this._bufs.push(isBuffer ? buf : new Buffer(buf))
this.length += buf.length
if (buf instanceof BufferList) {
this._bufs = this._bufs.concat(buf._bufs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do this._bufs.push.apply(this._bufs, buf._bufs) to prevent creation of a new array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@jcrugzz
Copy link
Collaborator

jcrugzz commented Feb 10, 2016

Im ok with this, can you forsee anyways this could break current code? It should work transparently so I'm ok with releasing this as patch.

This provides support for node v5.6.0.

Fixes #26.
@mcollina
Copy link
Collaborator Author

No I think this is ok and good. The test passed as is, so I don't foresee any issue.
I would release this as patch.

@rvagg ?

@rvagg
Copy link
Owner

rvagg commented Feb 11, 2016

Let's go with this as patch and #28 as minor cause it's adding features, sorry I missed this one!

@rvagg
Copy link
Owner

rvagg commented Feb 11, 2016

just pushed out v1.0.3 with this

@rvagg rvagg closed this Feb 11, 2016
@mcollina
Copy link
Collaborator Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants