Skip to content

Commit

Permalink
fix(server): workaround for issue with stream reply
Browse files Browse the repository at this point in the history
  • Loading branch information
simme committed Apr 25, 2015
1 parent 440ea85 commit 7d48de0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ API.get = function getComments(request, reply) {
});

var responseStream = jstream.stringify();
// @FIXME: This is a work around for a bug (?) in Hapi.
// https://github.com/hapijs/hapi/issues/2368
// Or in JSONStream...
responseStream._readableState = {};
var commentStream = new comments();
stream.pipe(commentStream).pipe(responseStream);

Expand Down

0 comments on commit 7d48de0

Please sign in to comment.