Sporadic test failures (fairly consistently on Mac). Problem was some tests sent a message to a client socket before the close notification had been received. Wait for client connection to close rather than waiting for the server to stop. Also, with NIO, close the channel on accept exception. Also improve debugging by including a log of new connections including the id.