fix a bug in TestServer. Now it can close a socketChannel when the connection is lost, avoiding continue show the channel is readable.
enrich function of TestServer