Skip to content

Commit

Permalink
[examples][tcpserver]打印错误值errno
Browse files Browse the repository at this point in the history
  • Loading branch information
yangpengya authored and Rbb666 committed Dec 28, 2023
1 parent fb8f145 commit e92d66e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/network/tcpserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void tcpserv(void *arg)
bytes_received = recv(connected, recv_data, BUFSZ, 0);
if (bytes_received < 0)
{
LOG_E("Received error, close the connect.");
LOG_E("Received error(%d), close the connect.", errno);
closesocket(connected);
connected = -1;
break;
Expand Down Expand Up @@ -180,7 +180,7 @@ static void tcpserv(void *arg)
ret = send(connected, send_data, rt_strlen(send_data), 0);
if (ret < 0)
{
LOG_E("send error, close the connect.");
LOG_E("send error(%d), close the connect.", errno);
closesocket(connected);
connected = -1;
break;
Expand Down

0 comments on commit e92d66e

Please sign in to comment.