vquic: replace assert

Replace the hard assert in case not all data is send on UDP
(which should never happen), with an error return.

Closes #18495
This commit is contained in:
Stefan Eissing 2025-09-08 15:29:29 +02:00 committed by Daniel Stenberg
parent 84db7a9eae
commit e3c06ccc66
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -186,8 +186,9 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
return CURLE_SEND_ERROR;
}
}
else {
assert(pktlen == (size_t)sent);
else if(pktlen != (size_t)sent) {
failf(data, "sendmsg() sent only %zd/%zu bytes", sent, pktlen);
return CURLE_SEND_ERROR;
}
#else
ssize_t sent;