mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 05:10:40 +00:00
"Not connected" shouldn't be fatal (as opposed to "closed")
This commit is contained in:
parent
998ed99288
commit
2cfc9e286e
@ -1241,7 +1241,7 @@ lwip_netconn_do_disconnect(struct api_msg_msg *msg)
|
|||||||
void
|
void
|
||||||
lwip_netconn_do_listen(struct api_msg_msg *msg)
|
lwip_netconn_do_listen(struct api_msg_msg *msg)
|
||||||
{
|
{
|
||||||
if (ERR_IS_FATAL_LISTENCONNECT(msg->conn->last_err)) {
|
if (ERR_IS_FATAL(msg->conn->last_err)) {
|
||||||
msg->err = msg->conn->last_err;
|
msg->err = msg->conn->last_err;
|
||||||
} else {
|
} else {
|
||||||
msg->err = ERR_CONN;
|
msg->err = ERR_CONN;
|
||||||
|
@ -61,10 +61,8 @@ typedef s8_t err_t;
|
|||||||
#define ERR_ALREADY -9 /* Already connecting. */
|
#define ERR_ALREADY -9 /* Already connecting. */
|
||||||
#define ERR_ISCONN -10 /* Conn already established.*/
|
#define ERR_ISCONN -10 /* Conn already established.*/
|
||||||
|
|
||||||
#define ERR_IS_FATAL(e) ((e) < ERR_ISCONN)
|
|
||||||
|
|
||||||
#define ERR_CONN -11 /* Not connected. */
|
#define ERR_CONN -11 /* Not connected. */
|
||||||
#define ERR_IS_FATAL_LISTENCONNECT(e) ((e) < ERR_CONN)
|
#define ERR_IS_FATAL(e) ((e) < ERR_CONN)
|
||||||
|
|
||||||
#define ERR_ABRT -12 /* Connection aborted. */
|
#define ERR_ABRT -12 /* Connection aborted. */
|
||||||
#define ERR_RST -13 /* Connection reset. */
|
#define ERR_RST -13 /* Connection reset. */
|
||||||
|
Loading…
Reference in New Issue
Block a user