Skip to content

Commit

Permalink
samples: net: echo_server: Do not bail out on Accept errors
Browse files Browse the repository at this point in the history
Echo-server sample should not bail out on failed
accept() calls. This sample should close socket
in case of any errors and keep listening on socket
for further incoming connections.

Signed-off-by: Ravi kumar Veeramally <[email protected]>
  • Loading branch information
rveerama1 authored and jukkar committed Jan 23, 2020
1 parent d228dd0 commit 326302e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/net/sockets/echo_server/src/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int process_tcp(struct data *data)
&client_addr_len);
if (client < 0) {
LOG_ERR("%s accept error (%d)", data->proto, -errno);
return -errno;
return 0;
}

slot = get_free_slot(data);
Expand Down

0 comments on commit 326302e

Please sign in to comment.