mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 13:33:31 +08:00
[LWIP] fixed closesocket issues: socket has been closed, delete it from file system fd.
This commit is contained in:
parent
c77cebc4c0
commit
a2d1f21b43
@ -327,6 +327,13 @@ RTM_EXPORT(socket);
|
||||
int closesocket(int s)
|
||||
{
|
||||
int sock = dfs_net_getsocket(s);
|
||||
struct dfs_fd *d;
|
||||
|
||||
d = fd_get(s);
|
||||
|
||||
/* socket has been closed, delete it from file system fd */
|
||||
fd_put(d);
|
||||
fd_put(d);
|
||||
|
||||
return lwip_close(sock);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user