Closed dy93 closed 8 years ago
I think that the simpler way would be to use getStream().connection.end()
, but it is not really a public API. So I will have to introduce one anyway.
Thank you for suggestion!
OK, I'll try it.
@dy93 4a88e6e should help. With it - it will look like req.spdyStream.connection.end()
which is IMO much better ;)
In some case i want to gracefully shutdown old server processes and replace it with new ones.
I found that http2's spec says GOAWAY frame can be used to stop accepting new streams and help me gracefully shut down my server process [https://http2.github.io/http2-spec/#GOAWAY]
currently I use following code to send GOAWAY, but after sending GOAWAY frame, the current working stream will fail in the end
here is the code to explain my situation
this will start a simple server listen at 3000 port and show a download link when you visit it, here
large.bin
is a large file which will take a few seconds to download(ex: 1GB random file). my expect result is:get file
link, large.bin can be successful downloadbut in practice, download process will fail in the end, my chrome simply show "download fail" after data transfer finished.
here is my environment: client: chrome 47.0.2526.106 m / firefox 41.0.2 server: node v4.2.3
Thank you!