Skip to content

Commit 5251ab7

Browse files
authored
Merge pull request #1760 from RT-Thread/fix_lwip_wq
[lwIP] Fix the wait queue initialization issue.
2 parents 1b9e9a3 + 11479e5 commit 5251ab7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/net/lwip-2.0.2/src/api/sockets.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,6 @@ lwip_tryget_socket(int s)
410410
return tryget_socket(s);
411411
}
412412

413-
414-
415413
/**
416414
* Allocate a new socket for a given netconn.
417415
*
@@ -443,6 +441,9 @@ alloc_socket(struct netconn *newconn, int accepted)
443441
sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
444442
sockets[i].errevent = 0;
445443
sockets[i].err = 0;
444+
#ifdef SAL_USING_POSIX
445+
rt_wqueue_init(&sockets[i].wait_head);
446+
#endif
446447
return i + LWIP_SOCKET_OFFSET;
447448
}
448449
SYS_ARCH_UNPROTECT(lev);

0 commit comments

Comments
 (0)