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 committed Apr 23, 2024
1 parent e4c7ff2 commit fe0f045
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 fe0f045

Please sign in to comment.