--- livemedia.2017.01.26_org/BasicUsageEnvironment/BasicTaskScheduler.cpp	2017-01-26 12:29:37.000000000 +0100
+++ livemedia.2017.01.26_patch/BasicUsageEnvironment/BasicTaskScheduler.cpp	2017-01-30 20:26:36.370185605 +0100
@@ -25,7 +25,7 @@ along with this library; if not, write t
 #include <sys/select.h>
 #include <unix.h>
 #endif
-
+#include <fcntl.h>
 ////////// BasicTaskScheduler //////////
 
 BasicTaskScheduler* BasicTaskScheduler::createNew(unsigned maxSchedulerGranularity) {
@@ -111,12 +111,13 @@ void BasicTaskScheduler::SingleStep(unsi
 	// that had already been closed) being used in "select()" - we print out the sockets that were being used in "select()",
 	// to assist in debugging:
 	fprintf(stderr, "socket numbers used in the select() call:");
-	for (int i = 0; i < 10000; ++i) {
+	for (int i = 0; i < FD_SETSIZE; ++i) {
 	  if (FD_ISSET(i, &fReadSet) || FD_ISSET(i, &fWriteSet) || FD_ISSET(i, &fExceptionSet)) {
 	    fprintf(stderr, " %d(", i);
 	    if (FD_ISSET(i, &fReadSet)) fprintf(stderr, "r");
 	    if (FD_ISSET(i, &fWriteSet)) fprintf(stderr, "w");
 	    if (FD_ISSET(i, &fExceptionSet)) fprintf(stderr, "e");
+	    fprintf(stderr, ", F_GETFD:%d",fcntl(i, F_GETFD));
 	    fprintf(stderr, ")");
 	  }
 	}
