You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2016/10/04 16:26:20 UTC

[jira] [Created] (TS-4928) transactions should not destroy sessions

James Peach created TS-4928:
-------------------------------

             Summary: transactions should not destroy sessions
                 Key: TS-4928
                 URL: https://issues.apache.org/jira/browse/TS-4928
             Project: Traffic Server
          Issue Type: Bug
          Components: Core
            Reporter: James Peach


In {{Http1ClientSession}} we find the following code:

{noformat}
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();
  }
}
{noformat}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)