File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
components/mosquitto/port Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 33 *
44 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
55 *
6- * SPDX-FileContributor: 2024 Espressif Systems (Shanghai) CO LTD
6+ * SPDX-FileContributor: 2024-2025 Espressif Systems (Shanghai) CO LTD
77 */
88
99/*
@@ -106,6 +106,9 @@ struct mosquitto *net__socket_accept(struct mosquitto__listener_sock *listensock
106106
107107 new_sock = accept (listensock -> sock , NULL , 0 );
108108 if (new_sock == INVALID_SOCKET ) {
109+ if (errno == EAGAIN ) { // mosquitto tries to accept() in a loop until EAGAIN is returned
110+ return NULL ;
111+ }
109112 log__printf (NULL , MOSQ_LOG_ERR ,
110113 "Unable to accept new connection, system socket count has been exceeded. Try increasing \"ulimit -n\" or equivalent." );
111114 return NULL ;
You can’t perform that action at this time.
0 commit comments