Fix a bug in the driver, closing channel too soon

This commit is contained in:
2023-04-14 17:01:59 -04:00
parent 69f2fb6226
commit 2c2dabc127

View File

@@ -449,8 +449,10 @@ class Driver {
} }
if (chan.nbytes == 0) { if (chan.nbytes == 0) {
if (engw.get_channel_released(&engw, chan.chid)) { if (engw.get_channel_released(&engw, chan.chid)) {
close_channel(chan, ""); if (BIO_pending(chan.send_bio) == 0) {
any_released = true; close_channel(chan, "");
any_released = true;
}
} }
} }
} }