[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #28865] Cannot close socket/netconn in non-blocking co
From: |
Stephane Lesage |
Subject: |
[lwip-devel] [bug #28865] Cannot close socket/netconn in non-blocking connect |
Date: |
Thu, 11 Feb 2010 14:02:51 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/bugs/?28865>
Summary: Cannot close socket/netconn in non-blocking connect
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: slesage
Submitted on: jeu 11 fév 2010 15:02:50 CET
Category: TCP
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
Non-blocking mode for connect is very nice and alsmost working:
One of the interesting features is to able to cancel a pending connection.
This is currently forbidden by do_delconn.
As this is supported by tcp_close(), I think we just need to enable it in
do_delconn(). I tried and it seems to work.
Can you check that ?
diff -u -r1.133 api_msg.c
--- api_msg.c 9 Feb 2010 20:23:39 -0000 1.133
+++ api_msg.c 11 Feb 2010 14:01:17 -0000
@@ -764,7 +764,9 @@
do_delconn(struct api_msg_msg *msg)
{
/* @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 */
LWIP_ASSERT("msg->conn->type == NETCONN_TCP", msg->conn->type ==
NETCONN_TCP);
msg->err = ERR_INPROGRESS;
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?28865>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #28865] Cannot close socket/netconn in non-blocking connect,
Stephane Lesage <=