fent/node-feedsub — Issue #3: TypeError: Cannot call method 'readStop' of null - After initial feed retrieval...
Author: busticated
Created: 2011-11-19 06:30:26+00:00
State: open

Hey there -

Ran into a bit of an issue and figured I'd report it in case it's helpful. After initializing and downloading the first batch of feed updates and once the interval is completed, I get the following error:

net.js:197
this._handle.readStop();
^
TypeError: Cannot call method 'readStop' of null
at Socket.pause (net.js:197:16)
at IncomingMessage.pause (http.js:254:15)
at FeedReader. (/Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/lib/feedsub.js:154:19)
at /Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/lib/feedsub.js:10:62
at FeedReader. (/Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/lib/feedsub.js:143:18)
at SAXStream. (/Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/lib/feedsub.js:10:62)
at SAXStream.g (events.js:154:14)
at SAXStream.emit (events.js:67:17)
at /Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/node_modules/feedme/lib/feedme.js:116:23
at SAXStream. (/Users/mattmirande/Sites/chzbrgr/lolreader/node_modules/feedsub/node_modules/feedme/lib/feedme.js:65:14)

Looks like it may be a node core issue:

http://groups.google.com/group/nodejs-dev/browse_thread/thread/833d0714aba29b50/5b270916dfdb403f?show_docid=5b270916dfdb403f

https://github.com/joyent/node/issues/1980

To be clear, the initial update that occurs when you first run your app using feedsub works fine (new items come down)... it's the 2nd update that fails (after the 1st interval expires and feedsub checks for new items).

Fwiw, it *seems* that if there are new feed items available when feedsub tries to update, this error doesn't throw.

Otherwise, seems like a pretty handy lib - thanks for sharing it!
-matt