Skip to content

Commit 9b2a02f

Browse files
committed
lwip - Fixed error codes for failed TCP connect
condition posix error mbed error good host, closed port ECONNREFUSED NSAPI_ERROR_NO_CONNECTION bad host EHOSTUNREACH NSAPI_ERROR_NO_CONNECTION bad network ENETUNREACH NSAPI_ERROR_NO_CONNECTION
1 parent 1b019c3 commit 9b2a02f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/FEATURE_LWIP/lwip-interface/lwip_stack.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,12 @@ static nsapi_error_t mbed_lwip_err_remap(err_t err) {
555555
switch (err) {
556556
case ERR_OK:
557557
case ERR_CLSD:
558-
case ERR_RST:
559558
return 0;
560559
case ERR_MEM:
561560
return NSAPI_ERROR_NO_MEMORY;
562561
case ERR_CONN:
562+
case ERR_RST:
563+
case ERR_ABRT:
563564
return NSAPI_ERROR_NO_CONNECTION;
564565
case ERR_TIMEOUT:
565566
case ERR_RTE:

0 commit comments

Comments
 (0)