[Pkg-javascript-commits] [node-jsonstream] 71/214: make work with 10
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 1 12:58:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-jsonstream.
commit 4283c01e79e7491b6f0cf48c0568a6ad5ae7e7aa
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Sat Mar 16 13:34:50 2013 +1300
make work with 10
---
test/destroy_missing.js | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/destroy_missing.js b/test/destroy_missing.js
index 75fb8a8..315fdc8 100644
--- a/test/destroy_missing.js
+++ b/test/destroy_missing.js
@@ -7,16 +7,21 @@ var JSONStream = require('../');
var server = net.createServer(function(client) {
var parser = JSONStream.parse([]);
- parser.on('close', function() {
+ parser.on('end', function() {
+ console.log('close')
console.error('PASSED');
server.close();
});
client.pipe(parser);
- client.destroy();
+ var n = 4
+ client.on('data', function () {
+ if(--n) return
+ client.end();
+ })
});
server.listen(9999);
var client = net.connect({ port : 9999 }, function() {
- fs.createReadStream(file).pipe(client);
+ fs.createReadStream(file).pipe(client).on('data', console.log) //.resume();
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git
More information about the Pkg-javascript-commits
mailing list