diff options
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/net_close.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nuttx/net/net_close.c b/nuttx/net/net_close.c index 4a486d972..7432d2482 100644 --- a/nuttx/net/net_close.c +++ b/nuttx/net/net_close.c @@ -245,8 +245,9 @@ int net_close(int sockfd) { /* Yes... free the connection structure */ - uip_unlisten(conn); /* No longer accepting connections */ + uip_unlisten(conn); /* No longer accepting connections */ netclose_disconnect(psock); /* Break any current connections */ + conn->crefs = 0; /* No more references on the connection */ uip_tcpfree(conn); /* Free uIP resources */ } else |