Socket.Select returns error "An operation was attempted on something that is not a socket"

It turns out the sockets were closed. That's a really dumb error for .NET to be generating though just because of a closed socket.


I did a search on MSDN and got a couple of hits. See here & here

However, I haven't develop anything in WinSock but on Unix the way Select is implemented requires resetting the fd_set everytime Select returns. Maybe the same applies to WinSock implementation of Select also. If this is the case, your readList, writeList may have got corrupted after Select returned leading to the error you mentioned. Just a thought.