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:
parent
994bd5b876
commit
601e00376b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue