Skip to content

Commit

Permalink
Fix createWriteStream error emitting (send error to original stream o…
Browse files Browse the repository at this point in the history
…bject)
  • Loading branch information
harrisiirak committed Apr 19, 2014
1 parent ec5b7d8 commit c680d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/webhdfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ WebHDFS.prototype.createWriteStream = function createWriteStream (path, append,
req.on('data', function onError (data) {
var error = self._parseError(data.toString());
if (error) {
req.end();
stream.emit('error', error);
req.emit('error', error);
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webhdfs",
"version": "0.1.9",
"version": "0.1.10",
"description": "Node.js WebHDFS REST API client",
"main": "lib/webhdfs.js",
"scripts": {
Expand Down

0 comments on commit c680d9d

Please sign in to comment.