From c6de17d1e5aab919e2db548ef8ed69281b82ce8f Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 13 Mar 2011 11:17:18 +0000 Subject: [PATCH] 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). --- src/api/api_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 158325b0..b1a9e525 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -307,9 +307,9 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); if (newconn == NULL) { - /* connection has been closed */ - NETCONN_SET_SAFE_ERR(conn, ERR_CLSD); - return ERR_CLSD; + /* connection has been aborted */ + NETCONN_SET_SAFE_ERR(conn, ERR_ABRT); + return ERR_ABRT; } #if TCP_LISTEN_BACKLOG /* Let the stack know that we have accepted the connection. */