Commit 74e497c0 authored by Kenton Varda's avatar Kenton Varda

Prevent accidental reuse of Request objects, which otherwise leads to crazy errors.

parent 320f4ef1
......@@ -662,6 +662,7 @@ private:
template <typename Params, typename Results>
RemotePromise<Results> Request<Params, Results>::send() {
auto typelessPromise = hook->send();
hook = nullptr; // prevent reuse
// Convert the Promise to return the correct response type.
// Explicitly upcast to kj::Promise to make clear that calling .then() doesn't invalidate the
......
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