I replaced select() with poll()

Untested because I don't feel like setting up a MUCK database and all that other nonsense just to test something that fixes a bug I can't conceivably generate on my own in the first place.