diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 982ab2d08d..19f1af5358 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -619,7 +619,8 @@ int sal_accept(int socket, struct sockaddr *addr, socklen_t *addrlen) LOG_E("New socket registered failed, return error %d.", retval); return -1; } - + /* new socket create by accept should have the same netdev with server*/ + new_sock->netdev = sock->netdev; /* socket structure user_data used to store the acquired new socket */ new_sock->user_data = (void *) new_socket;