Skip to content

Commit

Permalink
add comment explaining receiver thread select loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Winkel authored and mwinkel-dev committed Apr 24, 2024
1 parent bd820b3 commit 6453f20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions servershr/ServerSendMessage.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ static void receiver_thread(void *sockptr)
int rep;
int num = 0;
struct timeval readto, timeout = {10, 0};
// Tries 10 times if select() always returns error (i.e., num < 0)
for (rep = 0; rep < 10; rep++)
{
for (readfds = fdactive, readto = timeout;;
Expand Down

0 comments on commit 6453f20

Please sign in to comment.