Add a reader in NIO server and fix bug when we disconnect in a bad way