samples: sockets: dumb_http_server: If send() fails, print errno

Helps with debugging TCP stack issues.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2020-10-01 14:54:30 +03:00 committed by Jukka Rissanen
commit 601e00376b

View file

@ -119,7 +119,7 @@ void main(void)
int sent_len = send(client, data, len, 0);
if (sent_len == -1) {
printf("Error sending data to peer\n");
printf("Error sending data to peer, errno: %d\n", errno);
break;
}
data += sent_len;