code: protected void removeConnection(FTPConnection con) throws IOException {
          synchronized(listeners) {
              for(IFTPListener l : listeners) {
                  l.onDisconnected(con);
              }
          }
          synchronized(connections) {
              connections.remove(con);
          }
      }
docs: Called when a connection is terminated
  @param con The FTP connection
  @throws IOException When an error occurs