BUG/MINOR: dns: missing test writing in output channel in session handler

This patch fix a case which should never happen writing
in output channel since we check available room before

This patch should fix github issue #1132
This commit is contained in:
Emeric Brun 2021-02-15 14:12:06 +01:00 committed by Christopher Faulet
parent 526b79219e
commit 743afeed33

View File

@ -592,7 +592,15 @@ static void dns_session_io_handler(struct appctx *appctx)
}
trash.data += len;
ci_putchk(si_ic(si), &trash);
if (ci_putchk(si_ic(si), &trash) == -1) {
/* should never happen since we
* check available_room is large
* enought here.
*/
si_rx_room_blk(si);
ret = 0;
break;
}
if (ds->tx_msg_offset) {
/* msg was not fully processed, we must be awake to drain pending data */