Commit 44eaeccd authored by Kenton Varda's avatar Kenton Varda

releaseParams() can be called multiple times.

The RPC system itself can sometimes call `releaseParams()` redundantly after the application has already called it. So, it's important that it be idempotent.
parent 19ee1540
...@@ -262,7 +262,7 @@ public: ...@@ -262,7 +262,7 @@ public:
} }
void releaseParams() override { void releaseParams() override {
KJ_REQUIRE(!releasedParams); // Note that releaseParams() is idempotent -- it can be called multiple times.
releasedParams = true; releasedParams = true;
inner->releaseParams(); inner->releaseParams();
} }
......
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