MCPcopy Create free account
hub / github.com/apache/trafficserver / new_transaction

Method new_transaction

src/proxy/http/Http1ClientSession.cc:459–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457}
458
459ProxyTransaction *
460Http1ClientSession::new_transaction()
461{
462 // If the client connection terminated during API callouts we're done.
463 if (nullptr == _vc) {
464 this->do_io_close(); // calls the SSN_CLOSE hooks to match the SSN_START hooks.
465 return nullptr;
466 }
467
468 if (!_vc->add_to_active_queue()) {
469 // no room in the active queue close the connection
470 this->do_io_close();
471 return nullptr;
472 }
473
474 // Defensive programming, make sure nothing persists across
475 // connection re-use
476 half_close = false;
477
478 read_state = HCS_ACTIVE_READER;
479
480 transact_count++;
481
482 trans.new_transaction(read_from_early_data > 0 ? true : false);
483 return &trans;
484}
485
486bool
487Http1ClientSession::attach_server_session(PoolableSession *ssession, bool transaction_done)

Callers 3

create_server_txnMethod · 0.45
main_event_handlerMethod · 0.45

Calls 2

do_io_closeMethod · 0.95
add_to_active_queueMethod · 0.45

Tested by

no test coverage detected