Closed boneskull closed 9 years ago
working on PR
nevermind, can't figure it out. there's some disagreement between the latest version of spdy
, io.js, and jschan
.
I'm getting a bunch of this:
TypeError: Cannot read property 'session' of undefined
at Server.<anonymous> (/Volumes/alien/projects/boneskull/jschan/lib/spdy/server.js:178:43)
at emitTwo (events.js:87:13)
at Server.emit (events.js:172:7)
at Connection.onrequest (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/server.js:293:10)
at emitTwo (events.js:87:13)
at Connection.emit (events.js:172:7)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:473:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
at Stream.start [as _start] (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/stream.js:249:23)
at Connection.handleSynStream [as _handleSynStream] (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/connection.js:299:10)
at Connection.handleFrame [as _handleFrame] (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/connection.js:182:19)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at onFrame (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/protocol/parser.js:232:12)
at /Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/protocol/parser.js:333:5
at /Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/protocol/parser.js:427:5
at done (/Volumes/alien/projects/boneskull/jschan/node_modules/spdy/lib/spdy/utils.js:111:7)
at afterWrite (_stream_writable.js:346:3)
at onwrite (_stream_writable.js:337:7)
at WritableState.onwrite (_stream_writable.js:89:5)
at afterTransform (_stream_transform.js:79:5)
at TransformState.afterTransform (_stream_transform.js:54:12)
at Zlib.callback (zlib.js:614:5)
When I try to use req.connection.socket.getSession()
, that doesn't work either because it's not the same socket from the connection
event, so _receive
is undefined
.
In ClientSession.prototype._createNewStream()
, I did this:
var req = http.request({
host: this.opts.host,
port: this.opts.port,
path: '/',
headers: headers,
method: 'POST',
agent: this.agent,
protocol: 'https:' // <-- this
}, function(res) {
chan.handleIn(res);
});
to avoid the original exception, but I think that alters how spdy
works, leading to this other issue
perhaps jschan should drop spdy altogether:
I think that's the plan, but we were waiting for a proper http2 implementation to be available.
i moved the spdy support to https://github.com/GraftJS/jschan-spdy, so we can switch out when needed.
this should also not stop you from using jschan anymore.
see GraftJS/graft#19