Skip to content

Commit b848ae0

Browse files
committed
Use the timeout value for non-blocking
1 parent 94e089e commit b848ae0

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

tls/client-tls-nonblocking.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ static int tcp_select(SOCKET_T socketfd, int to_sec, int rx)
6767
else
6868
sendfds = &fds;
6969

70+
timeout.tv_sec = to_sec;
71+
timeout.tv_usec = 0;
72+
7073
result = select(nfds, recvfds, sendfds, &errfds, &timeout);
7174

7275
if (result == 0)

tls/server-tls-nonblocking.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ static int tcp_select(SOCKET_T socketfd, int to_sec, int rx)
6969
else
7070
sendfds = &fds;
7171

72+
timeout.tv_sec = to_sec;
73+
timeout.tv_usec = 0;
74+
7275
result = select(nfds, recvfds, sendfds, &errfds, &timeout);
7376

7477
if (result == 0)

0 commit comments

Comments
 (0)