mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-29 18:07:08 +03:00
coap_tcp.c: Remove multi-threads warnings on TCP accept()
This commit is contained in:
1 parent
aab990ce86
commit
4f98e799b2
1 file changed
+8
-2
+8
-2
@@ -305,8 +305,14 @@ coap_socket_accept_tcp(coap_socket_t *server,
|
||||
new_client->fd = accept(server->fd, &remote_addr->addr.sa,
|
||||
&remote_addr->size);
|
||||
if (new_client->fd == COAP_INVALID_SOCKET) {
|
||||
coap_log_warn("coap_socket_accept_tcp: accept: %s\n",
|
||||
coap_socket_strerror());
|
||||
if (errno != EAGAIN
|
||||
#if EAGAIN != EWOULDBLOCK
|
||||
&& errno != EWOULDBLOCK
|
||||
#endif
|
||||
) {
|
||||
coap_log_warn("coap_socket_accept_tcp: accept: %s\n",
|
||||
coap_socket_strerror());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user