Fix BufferedStdinImpl reference counter.

This commit is contained in:
levlam 2020-12-24 19:17:06 +03:00
parent b582eb346a
commit 47e413e0b8

View File

@ -127,8 +127,9 @@ class BufferedStdinImpl : public Iocp::Callback {
break; break;
} }
writer_.confirm_append(r_size.ok()); writer_.confirm_append(r_size.ok());
if (iocp_ref_.post(0, this, nullptr)) { inc_refcnt();
inc_refcnt(); if (!iocp_ref_.post(0, this, nullptr)) {
dec_refcnt();
} }
} }
if (!iocp_ref_.post(0, this, nullptr)) { if (!iocp_ref_.post(0, this, nullptr)) {