telnet: send failure logged but not returned

Return error correctly when sending fails.

Reported-by: Joshua Rogers
Closes #18887
This commit is contained in:
Daniel Stenberg 2025-10-06 15:01:48 +02:00
parent 6d9636abd1
commit e214b14501
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -984,6 +984,7 @@ static CURLcode suboption(struct Curl_easy *data, struct TELNET *tn)
if(bytes_written < 0) {
err = SOCKERRNO;
failf(data,"Sending data failed (%d)",err);
return CURLE_SEND_ERROR;
}
printsub(data, '>', &temp[2], len-2);
break;