Skip to content

Commit f7c5ce1

Browse files
lhespressdonghengqaz
authored andcommitted
platform/esp-idf: Don't set SO_LINGER when bind process
1 parent 33ae030 commit f7c5ce1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

core/shared/platform/esp-idf/espidf_socket.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,12 @@ int
3939
os_socket_bind(bh_socket_t socket, const char *host, int *port)
4040
{
4141
struct sockaddr_in addr;
42-
struct linger ling;
4342
socklen_t socklen;
4443
int ret;
4544

4645
assert(host);
4746
assert(port);
4847

49-
ling.l_onoff = 1;
50-
ling.l_linger = 0;
51-
52-
ret = setsockopt(socket, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling));
53-
if (ret < 0) {
54-
goto fail;
55-
}
56-
5748
addr.sin_addr.s_addr = inet_addr(host);
5849
addr.sin_port = htons(*port);
5950
addr.sin_family = AF_INET;

0 commit comments

Comments
 (0)