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,11 +449,13 @@ 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)) {
if (BIO_pending(chan.send_bio) == 0) {
close_channel(chan, ""); close_channel(chan, "");
any_released = true; any_released = true;
} }
} }
} }
}
// Delete any released channels // Delete any released channels
if (any_released) { if (any_released) {