Skip to content
  • Witold Kręcicki's avatar
    allow tcpdns sockets to self-reference while connected · cd79b495
    Witold Kręcicki authored
    A TCPDNS socket creates a handle for each complete DNS message.
    
    Previously, when all the handles were disconnected, the socket
    would be closed, but the wrapped TCP socket might still have
    more to read.
    
    Now, when a connection is established, the TCPDNS socket creates
    a reference to itself by attaching itself to sock->self. This
    reference isn't cleared until the connection is closed via
    EOF, timeout, or server shutdown. This allows the socket to remain
    open even when there are no active handles for it.
    cd79b495