mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user