Commit 5106b472 authored by Kenton Varda's avatar Kenton Varda

Fix failures in http-over-capnp-test.

`task` needs to be the last member of ServerRequestContextImpl, because when we construct it, we call `service.request()`, which may call back to send() or acceptWebSocket(), which require `replyTask` to be initialized.
parent 181cc66a
...@@ -548,8 +548,8 @@ private: ...@@ -548,8 +548,8 @@ private:
kj::String url; kj::String url;
kj::HttpHeaders headers; kj::HttpHeaders headers;
capnp::HttpService::ClientRequestContext::Client clientContext; capnp::HttpService::ClientRequestContext::Client clientContext;
kj::Promise<void> task;
kj::Maybe<kj::Promise<void>> replyTask; kj::Maybe<kj::Promise<void>> replyTask;
kj::Promise<void> task;
static kj::HttpMethod validateMethod(capnp::HttpMethod method) { static kj::HttpMethod validateMethod(capnp::HttpMethod method) {
KJ_REQUIRE(method <= capnp::HttpMethod::UNSUBSCRIBE, "unknown method", method); KJ_REQUIRE(method <= capnp::HttpMethod::UNSUBSCRIBE, "unknown method", method);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment