无法读取属性“_idleNext”未定义的

发布于 2024-11-15 22:54:12 字数 883 浏览 4 评论 0原文

我在node.js 中为HTML5 EventSource 对象制作了一个pushlet。我在 Linux 上使用 0.4.8 版本。它有时工作正常,但有时会崩溃并出现以下错误:

_linklist.js:65
  item._idleNext = list._idleNext;

TypeError: Cannot read property '_idleNext' of undefined
    at Object.append (_linklist.js:65:24)
    at Object.active (timers.js:136:9)
    at Socket._writeOut (net.js:461:10)
    at Socket.write (net.js:378:17)
    at ServerResponse.end (http.js:671:29)
    at IncomingMessage.<anonymous> ([my pushlet url]:88:13)
    at IncomingMessage.emit (events.js:61:17)
    at HTTPParser.onMessageComplete (http.js:133:23)
    at Socket.ondata (http.js:1018:22)
    at Socket._onReadable (net.js:684:27)

当它崩溃时,它会在收到第一个请求时崩溃。如果没有,它可以很好地满足不久的将来的所有请求。我注意到,当我打开 NodeJS Pushlet 启动后响应的基本 url 时,它永远不会崩溃,并且可以很好地处理后续请求。不管怎样,只要它工作,如果长时间闲置,它很可能在收到下一个请求时崩溃。

有人知道这里出了什么问题吗?我是否做错了什么,或者这是一个我们可以期望在未来版本中修复的错误?

I've made a pushlet for HTML5 EventSource object in node.js. I'm using version 0.4.8 on linux. It sometimes works ok, but sometimes it will crash with the following error:

_linklist.js:65
  item._idleNext = list._idleNext;

TypeError: Cannot read property '_idleNext' of undefined
    at Object.append (_linklist.js:65:24)
    at Object.active (timers.js:136:9)
    at Socket._writeOut (net.js:461:10)
    at Socket.write (net.js:378:17)
    at ServerResponse.end (http.js:671:29)
    at IncomingMessage.<anonymous> ([my pushlet url]:88:13)
    at IncomingMessage.emit (events.js:61:17)
    at HTTPParser.onMessageComplete (http.js:133:23)
    at Socket.ondata (http.js:1018:22)
    at Socket._onReadable (net.js:684:27)

When it crashes, it crashes on the first request it receives. If it doesn't, it works well with all requests in close future. I've notices that when I open the base url on which my nodeJS pushlet responds after starting it, it never crashes and keeps working well for subsequent requests. Either way, whenever it works, if left idle for a long time it has a good chance of crashing when it receives the next request.

Anyone have an idea about what's wrong here? Am I doing something wrong or is it a bug that we can expect to be fixed in future versions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我也只是我 2024-11-22 22:54:12

更新到0.4.9版本解决了我的问题。

Update to the version 0.4.9 has solved my problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文