mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-25 16:44:04 +00:00
Fixed bug #28865 (Cannot close socket/netconn in non-blocking connect)
This commit is contained in:
parent
39df7d048c
commit
c73b1b4fa2
@ -110,6 +110,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2010-02-12: Simon Goldschmidt/Stephane Lesage
|
||||||
|
* api_msg.c: Fixed bug #28865 (Cannot close socket/netconn in non-blocking
|
||||||
|
connect)
|
||||||
|
|
||||||
2010-02-12: Simon Goldschmidt
|
2010-02-12: Simon Goldschmidt
|
||||||
* mem.h: Fixed bug #28866 (mem_realloc function defined in mem.h)
|
* mem.h: Fixed bug #28866 (mem_realloc function defined in mem.h)
|
||||||
|
|
||||||
|
@ -762,11 +762,15 @@ void
|
|||||||
do_delconn(struct api_msg_msg *msg)
|
do_delconn(struct api_msg_msg *msg)
|
||||||
{
|
{
|
||||||
/* @todo TCP: abort running write/connect? */
|
/* @todo TCP: abort running write/connect? */
|
||||||
if ((msg->conn->state != NETCONN_NONE) && (msg->conn->state != NETCONN_LISTEN)) {
|
if ((msg->conn->state != NETCONN_NONE) &&
|
||||||
|
(msg->conn->state != NETCONN_LISTEN) &&
|
||||||
|
(msg->conn->state != NETCONN_CONNECT)) {
|
||||||
/* this only happens for TCP netconns */
|
/* this only happens for TCP netconns */
|
||||||
LWIP_ASSERT("msg->conn->type == NETCONN_TCP", msg->conn->type == NETCONN_TCP);
|
LWIP_ASSERT("msg->conn->type == NETCONN_TCP", msg->conn->type == NETCONN_TCP);
|
||||||
msg->err = ERR_INPROGRESS;
|
msg->err = ERR_INPROGRESS;
|
||||||
} else {
|
} else {
|
||||||
|
LWIP_ASSERT("blocking connect in progress",
|
||||||
|
(msg->conn->state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn));
|
||||||
/* Drain and delete mboxes */
|
/* Drain and delete mboxes */
|
||||||
netconn_drain(msg->conn);
|
netconn_drain(msg->conn);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user