Hi, I was playing around with the new HTTP over capnp feature in 0.8.0, and one oddity I stumbled upon is that there doesn't seem to be a easy way to drain outstanding requests when shutting down. I think this is best demonstrated by small code example.
I have this very simple kj::HttpService that I'm exposing through capnp-rpc: https://github.com/zokier/capnp-stdio-proxy/blob/master/hello-server.cpp and corresponding client https://github.com/zokier/capnp-stdio-proxy/blob/master/proxy-client.cpp When I curl http://localhost:8080/exit the service does exit, but the response body never makes it through. The error message I see from my "proxy-client" is: kj/compat/http.c++:5079: error: unhandled exception in HTTP server; exception = kj/compat/http.c++:1852: failed: previous HTTP message body incomplete; can't write more messages To me it seems like the server exits before the client manages to fetch the response body, which is obviously not good. I'm not sure if the problem is that the promise from line 24 `response.sendError(200, "OK", headers)` resolves too early, or if the HttpOverCapnp thingy needs some explicit way to drain the server. As a side-note I noticed that the http-over-capnp files were not included in the release tarball, I needed to poke around bit in Makefile.am and git checkout to get those installed. No biggie, but I imagine you'll want to get that fixed for next release. /Torste Aikio -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/c16d69d1-5803-4dbe-8666-742de8641a50%40googlegroups.com.