Skip to content
  • Linus Nielsen's avatar
    Introducing a new persistent connection caching system using "bundles". · d021f2e8
    Linus Nielsen authored
    A bundle is a list of all persistent connections to the same host.
    The connection cache consists of a hash of bundles, with the
    hostname as the key.
    The benefits may not be obvious, but they are two:
    
    1) Faster search for connections to reuse, since the hash
       lookup only finds connections to the host in question.
    2) It lays out the groundworks for an upcoming patch,
       which will introduce multiple HTTP pipelines.
    
    This patch also removes the awkward list of "closure handles",
    which were needed to send QUIT commands to the FTP server
    when closing a connection.
    Now we allocate a separate closure handle and use that
    one to close all connections.
    
    This has been tested in a live system for a few weeks, and of
    course passes the test suite.
    d021f2e8