samples: net: sockets: echo_client/server: Bump ZVFS_OPEN_MAX config
Recent POSIX changes caused that 3 file descriptors are now preallocated for stdin/out/err. This caused file descriptor shortage in all-in TLS configuration of the sample, hence increase the maximum FD count. In the server sample this manifested itself as an accept() error. This triggered a busy loop though in the sample, as in case of accept() errors it'd just try again w/o any delay. This made this issue hard to investigate, so to avoid such cases in the future, make the accept() failure fatal in the echo_server sample. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
fa27d706ea
commit
67187f620b
|
@ -13,4 +13,4 @@ CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
|
|||
CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=4
|
||||
CONFIG_NET_SOCKETS_ENABLE_DTLS=y
|
||||
CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH=2048
|
||||
CONFIG_ZVFS_OPEN_MAX=8
|
||||
CONFIG_ZVFS_OPEN_MAX=12
|
||||
|
|
|
@ -14,4 +14,4 @@ CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=6
|
|||
CONFIG_NET_SOCKETS_ENABLE_DTLS=y
|
||||
CONFIG_NET_SOCKETS_DTLS_TIMEOUT=30000
|
||||
CONFIG_NET_SOCKETS_DTLS_MAX_FRAGMENT_LENGTH=2048
|
||||
CONFIG_ZVFS_OPEN_MAX=16
|
||||
CONFIG_ZVFS_OPEN_MAX=20
|
||||
|
|
|
@ -236,7 +236,7 @@ static int process_tcp(struct data *data)
|
|||
&client_addr_len);
|
||||
if (client < 0) {
|
||||
LOG_ERR("%s accept error (%d)", data->proto, -errno);
|
||||
return 0;
|
||||
return -errno;
|
||||
}
|
||||
|
||||
slot = get_free_slot(data);
|
||||
|
|
Loading…
Reference in New Issue