samples: net: echo_server: Do not bail out on Accept errors

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 <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
Ravi kumar Veeramally 2020-01-22 13:41:25 +02:00 committed by Jukka Rissanen
commit 326302eda0

View file

@ -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);