[wpinet] uv::Request: Return shared_ptr from Release() (#5656)

Use this in Stream to allow the finish() callback to reuse the request.
This commit is contained in:
Peter Johnson
2023-09-17 20:01:43 -07:00
committed by GitHub
parent 40b552be4a
commit 5383589f99
2 changed files with 7 additions and 2 deletions

View File

@@ -97,8 +97,8 @@ void Stream::Write(std::span<const Buffer> bufs,
if (status < 0) {
h.ReportError(status);
}
auto ptr = h.Release(); // one-shot, but finish() may Keep()
h.finish(Error(status));
h.Release(); // this is always a one-shot
})) {
req->Keep();
}