diff --git a/components/net/sal_socket/socket/net_sockets.c b/components/net/sal_socket/socket/net_sockets.c index 12024c8173..a53b2f1f9c 100644 --- a/components/net/sal_socket/socket/net_sockets.c +++ b/components/net/sal_socket/socket/net_sockets.c @@ -105,9 +105,7 @@ int shutdown(int s, int how) rt_set_errno(-ENOTSOCK); error = -1; } - - /* socket has been closed, delete it from file system fd */ - fd_put(d); + fd_put(d); return error; diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 4a9056838d..2d8e703845 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -701,8 +701,6 @@ int sal_shutdown(int socket, int how) error = -1; } - /* delete socket */ - socket_delete(socket); return error; }