Fixed an error in the unit tests.

Since the previous commit made all sockets use select, the unit tests
failed because the unit tests make use of mocks which are incompatible
with select().

Now, the tests pass because select() is not used if the socket is a
mock.