spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

some spdystate.priority issue #153

Closed jonathanong closed 10 years ago

jonathanong commented 10 years ago
Uncaught TypeError: Cannot call method 'push' of undefined
      at Scheduler.scheduleLast (/Users/jong/Workspace/normalize/proxy.js/node_modules/spdy/lib/spdy/scheduler.js:48:47)

when i console.log(stream._spdyState.priority), i get the following priorities:

0
0
1
2
3
4
5
6
7
8

i guess an invalid priority is being set since IIRC the priority should be 0-7. perhaps do a min/max on the priorities?

i don't have a test case, yet, though i'm guessing the issue is because i'm pushing a LOT of streams

indutny commented 10 years ago

Yeah, I think Math.min(Math.max) would work fine at scheduler level. Could you please add them?