Skip to content

Commit c2c23ff

Browse files
Add check that data is already owned by engine
1 parent e41fc86 commit c2c23ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/liblsquic/lsquic_mini_conn_ietf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,8 +1537,10 @@ imico_maybe_delay_processing (struct ietf_mini_conn *conn,
15371537

15381538
if (conn->imc_delayed_packets_count < max_delayed)
15391539
{
1540-
if (lsquic_conn_copy_and_release_pi_data(&conn->imc_conn, conn->imc_enpub,
1541-
packet_in) != 0) {
1540+
int copy_success = packet_in->pi_flags & PI_OWN_DATA ||
1541+
lsquic_conn_copy_and_release_pi_data(
1542+
&conn->imc_conn, conn->imc_enpub, packet_in) != 0;
1543+
if (!copy_success) {
15421544
LSQ_DEBUG("drop packet, copy data failed");
15431545
return;
15441546
}

0 commit comments

Comments
 (0)