private void accept(Socket socket){
  log.info("Client connected from {}",socket.getInetAddress());
  try {
    try (Connection clientConnection=new Connection(socket)){
      ServerSession session=ServerSession.newSession(services,clientConnection,command);
      log.info("Client {} disconnected",socket);
    }
   }
 catch (  IOException e) {
    log.info("Could not accept connection from {}: {}",socket.getInetAddress(),e.toString());
  }
 finally {
    try {
      socket.close();
    }
 catch (    IOException e) {
    }
  }
}

private void accept ( Socket socket ) { log . info ( "Client connected from {}" , socket . getInetAddress ( ) ) ; try { try ( Connection clientConnection = new Connection ( socket ) ) { ServerSession session = ServerSession . newSession ( services , clientConnection , command ) ; log . info ( "Client {} disconnected" , socket ) ; } } catch ( IOException e ) { log . info ( "Could not accept connection from {}: {}" , socket . getInetAddress ( ) , e . toString ( ) ) ; } finally { try { socket . close ( ) ; } catch ( IOException e ) { } } }
accept a connection from a client . will block until processing completes ( typically because the client closes its connection to us ) . < p > the socket and any associated streams will be closed before this call completes .
