Enhance fake_socket unit test to detect closed sockets.