fix: release fd from stream_descriptor to prevent double or prematurely close
This commit is contained in:
parent
42a98a44e7
commit
733831c30e
1 changed files with 2 additions and 0 deletions
|
@ -622,6 +622,8 @@ struct watcher_impl {
|
||||||
: ctx{strand.ref->ctx}, strand_{strand.ref->strand_},
|
: ctx{strand.ref->ctx}, strand_{strand.ref->strand_},
|
||||||
fd_{*ctx->asio, fd} {}
|
fd_{*ctx->asio, fd} {}
|
||||||
|
|
||||||
|
~watcher_impl() { fd_.release(); }
|
||||||
|
|
||||||
void wait_read(watcher::handler h) {
|
void wait_read(watcher::handler h) {
|
||||||
if (!read_in_progress_) {
|
if (!read_in_progress_) {
|
||||||
read_in_progress_ = true;
|
read_in_progress_ = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue