Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4928

Transactions should not destroy sessions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 7.1.0
    • Core
    • None

    Description

      In Http1ClientSession we find the following code:

      void
      Http1ClientTransaction::transaction_done()
      {
        current_reader = NULL;
        // If the parent session is not in the closed state, the destroy will not occur.
        if (parent) {
          parent->destroy();
        }
      }
      

      the model, as I understand it, is that sessions own transactions, so it is quite unexpected for the transaction to reach up an kill its parent. It is a very surprising side-effect of transaction_done and means that this can only be reliably used in the specific context of the calling code.

      Additionally, why isn't the parent cleared in destroy()? If it must be NULL, we should have an assertion.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jamespeach James Peach
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: