Corrected pruneSocketSet logic used in select() calls