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

Backpressure problem in stream session #38

Open
heri16 opened this issue Oct 28, 2015 · 1 comment
Open

Backpressure problem in stream session #38

heri16 opened this issue Oct 28, 2015 · 1 comment

Comments

@heri16
Copy link

heri16 commented Oct 28, 2015

According to the spec at https://nodejs.org/api/stream.html#stream_readable_read_size_1
Note: once the _read() method is called, it will not be called again until the push method is called.

This causes done() to never be called when ByteStream on remote-side has finished and is sending an { id: x } message. When done() is not called, back pressure is not released in session inStream.

stream/channels.js

ByteStream.prototype._read = function() {
74    var done = this._lastDone;
75    if (done) {
76      this._lastDone = null;
77      done();
78    }
79    return null;
80  };
@heri16
Copy link
Author

heri16 commented Oct 28, 2015

Could be a problem with nodejs itself on windows or a race condition between dispatch() and _read().

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

No branches or pull requests

1 participant