sorry, your code doesn't make sense. at all.

1. A Readable is an abstract Stream, you have to implement rs._read method.

2. your if- you try to filter something out, right? may be Array#filter is 
something for you

3. your first push pushes a string 'myArray[i]' looks like a bug

4. On *every* look run you push *null* wich is an indicator that the stream 
is done. so on the first looprun you push null and on the second you get 
your EOF error, because of the first push

5. on *every* loop run you pipe the same stream to the same stream over and 
over. this is so wrong, i'm just no able to determine how wrong it is.

so far ok? i hope i haven't hurt you, sorry if i did :) no offense


Am Mittwoch, 16. Oktober 2013 16:43:13 UTC+2 schrieb Marco Ippolito:
>
> Hi everybody,
>
> I'm getting this error:
>
> node s_call
>
> Error: stream.push() after EOF
>     at readableAddChunk (_stream_readable.js:146:15)
>     at Readable.push (_stream_readable.js:127:10)
>     at Request.querySelector [as _callback] (/home/ubuntu/s_call.js:27:8)
>     at Request.self.callback 
> (/home/ubuntu/node_modules/request/request.js:129:22)
>     at Request.EventEmitter.emit (events.js:98:17)
>     at Request.<anonymous> 
> (/home/ubuntu/node_modules/request/request.js:873:14)
>     at Request.EventEmitter.emit (events.js:117:20)
>     at IncomingMessage.<anonymous> 
> (/home/ubuntu/node_modules/request/request.js:824:12)
>     at IncomingMessage.EventEmitter.emit (events.js:117:20)
>     at _stream_readable.js:910:16
>
> node version: v.0.10.12
>
> my snippet is:
> var stream = require('stream');
> var Readable = stream.Readable;
> var rs = new Readable();
>
> for (var i = 0; i < myArray.length; i++) {
>   if (myArray[i] = some conditions) myArray.splice(i,1);
>   rs.push('myArray[i]');
>   rs.push(null);
>   rs.pipe(process.stdout);
> }
>
>
> What do you suggest me to do?
>
> Kind regards
> Marco
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to