Skip to content
  • Ondřej Surý's avatar
    Add attach/detach for the dns_dispatch_send() · f3ca90a8
    Ondřej Surý authored
    The order in which the netievents are processed on the network manager
    loop is not guaranteed.  Therefore the recv/read callback can come
    earlier than the send/write callback.
    
    The dns_request API wasn't ready for this reordering and it was
    destroying the dns_request_t object before the send callback has been
    called.
    
    Add additional attach/detach in the req_send()/req_senddone() functions
    to make sure we don't destroy the dns_request_t while it's still being
    references by asynchronous call.
    f3ca90a8