*/
	public void testCloseWhenInSelector2() throws Throwable {
		//this test seems to be failing on linux now for some reason,
                //which means the bug is fixed, but I am confused as it
                //still sometimes passes.
                String os = System.getProperty("os.name");
                if(os.contains("Linux"))
			return;


		//the try catch is big because it can happen on the first connect or the last one
		//depending on if you have run this test already!!!!
		try {
			InetAddress loopBack = InetAddress.getByName("127.0.0.1");
			InetSocketAddress clientAddr = new InetSocketAddress(loopBack, CLIENT_PORT);		
			InetSocketAddress serverAddr = new InetSocketAddress(loopBack, SERVER_PORT);
			
			//serverSocket.configureBlocking(false);
			serverSocket.socket().bind(serverAddr);
			client.socket().bind(clientAddr);
	
			client.connect(serverAddr);
			client.configureBlocking(false);
			log.info("connecting client socket");
	
			Thread.sleep(1000);
			
			serverSocket.configureBlocking(true);
			log.info("about to accept");
			SocketChannel serverChannel = serverSocket.accept();
			log.info("accepted");
			serverChannel.configureBlocking(false);
			log.info("client socket connected");
			
			serverChannel.register(selector, SelectionKey.OP_READ);
			PollingThread2 server = new PollingThread2();
			server.start();
			
			client.finishConnect();
			
			log.info("write data to server");
			ByteBuffer b = ByteBuffer.allocate(10);
			b.putChar('d');
			b.putChar('e');
			b.flip();
			log.info("write bytes");
			int i = client.write(b);
			log.info("wrote bytes="+i);
			
			//wait for other thread to get into the selector...
			Thread.sleep(1000);
			log.info("1. closing client channel");
			client.close();
			log.info("1. closed client channel");	
	
			server.waitForCompletion();
			
			client = provider.openSocketChannel();			
			client.socket().setReuseAddress(true);
			client.socket().bind(clientAddr);
	
			client.connect(serverAddr);
			client.configureBlocking(false);		
			
			fail("setReuseAddress typically works but does not in this specific instance");
		} catch(BindException e) {
			
		}
		
	}