mqtt: on send error, return error
Reported-by: Maciej Domanski Closes #10623
This commit is contained in:
Родитель
3b23dbeec1
Коммит
252fce70b1
|
@ -122,8 +122,9 @@ static CURLcode mqtt_send(struct Curl_easy *data,
|
|||
struct MQTT *mq = data->req.p.mqtt;
|
||||
ssize_t n;
|
||||
result = Curl_write(data, sockfd, buf, len, &n);
|
||||
if(!result)
|
||||
Curl_debug(data, CURLINFO_HEADER_OUT, buf, (size_t)n);
|
||||
if(result)
|
||||
return result;
|
||||
Curl_debug(data, CURLINFO_HEADER_OUT, buf, (size_t)n);
|
||||
if(len != (size_t)n) {
|
||||
size_t nsend = len - n;
|
||||
char *sendleftovers = Curl_memdup(&buf[n], nsend);
|
||||
|
|
Загрузка…
Ссылка в новой задаче