diff --git a/luprex/cpp/drv/driver-common.cpp b/luprex/cpp/drv/driver-common.cpp index 78d81ef9..816d3073 100644 --- a/luprex/cpp/drv/driver-common.cpp +++ b/luprex/cpp/drv/driver-common.cpp @@ -449,8 +449,10 @@ class Driver { } if (chan.nbytes == 0) { if (engw.get_channel_released(&engw, chan.chid)) { - close_channel(chan, ""); - any_released = true; + if (BIO_pending(chan.send_bio) == 0) { + close_channel(chan, ""); + any_released = true; + } } } }