Skip to content

Commit 4830774

Browse files
committed
esp32/modsocket: add note about ECONNRESET vs. ECONNREFUSED
1 parent cf45cd0 commit 4830774

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ports/esp32/modsocket.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,9 @@ STATIC mp_obj_t socket_connect(const mp_obj_t arg0, const mp_obj_t arg1) {
376376
MP_THREAD_GIL_ENTER();
377377
lwip_freeaddrinfo(res);
378378
if (r != 0) {
379+
// side-note: LwIP internally doesn't seem to have an error code for ECONNREFUSED and
380+
// so refused connections show up as ECONNRESET. Could be band-aided for blocking connect,
381+
// harder to do for nonblocking.
379382
exception_from_errno(errno);
380383
}
381384

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy