jsha / blocktogether

Share your blocks and subscribe to others'
GNU General Public License v3.0
330 stars 68 forks source link

Use HTTP/2 #189

Open jsha opened 9 years ago

jsha commented 9 years ago

This is mostly working in the http2 branch. The missing piece is that connection keepalive keeps processes running when they should exit.

jsha commented 9 years ago

Tried this, got a number of errors after running for a few minutes:


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: stream.push() after EOF
    at readableAddChunk (_stream_readable.js:146:15)
    at Connection.Readable.push (_stream_readable.js:127:10)
    at Connection._parentPush (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/flow.js:243:32)
    at Connection._push (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/flow.js:254:17)
    at Connection.push (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/flow.js:285:23)
    at Connection._receivePing (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/connection.js:528:10)
    at Connection.EventEmitter.emit (events.js:95:17)
    at Connection._writeControlFrame (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/connection.js:128:10)
    at Connection._receive (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/connection.js:372:19)
    at Connection._write (/data/blocktogether/releases/20150523215549/node_modules/node-twitter-api/node_modules/oauth/node_modules/http2/lib/protocol/flow.js:101:10)

I suspect this is due to the server-side (Twitter) closing the connection after some amount of time or number of connections has passed, plus missing client-side socket error handling: https://github.com/molnarg/node-http2/issues/56