mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-15 22:21:51 +00:00
netconn_accept: return ERR_ABRT instead of ERR_CLSD if the connection has been aborted by err_tcp (since this is not a normal closing procedure).
This commit is contained in:
parent
5b084f4b95
commit
c6de17d1e5
@ -307,9 +307,9 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn)
|
|||||||
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0);
|
||||||
|
|
||||||
if (newconn == NULL) {
|
if (newconn == NULL) {
|
||||||
/* connection has been closed */
|
/* connection has been aborted */
|
||||||
NETCONN_SET_SAFE_ERR(conn, ERR_CLSD);
|
NETCONN_SET_SAFE_ERR(conn, ERR_ABRT);
|
||||||
return ERR_CLSD;
|
return ERR_ABRT;
|
||||||
}
|
}
|
||||||
#if TCP_LISTEN_BACKLOG
|
#if TCP_LISTEN_BACKLOG
|
||||||
/* Let the stack know that we have accepted the connection. */
|
/* Let the stack know that we have accepted the connection. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user