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

Method releaseSession

src/proxy/http/HttpSessionManager.cc:225–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void
226ServerSessionPool::releaseSession(PoolableSession *ss)
227{
228 ss->state = PoolableSession::KA_POOLED;
229 // Now we need to issue a read on the connection to detect
230 // if it closes on us. We will get called back in the
231 // continuation for this bucket, ensuring we have the lock
232 // to remove the connection from our lists
233 // Actually need to have a buffer here, otherwise the vc is
234 // disabled
235 ss->do_io_read(this, INT64_MAX, ss->get_remote_reader()->mbuf);
236
237 // Transfer control of the write side as well
238 ss->do_io_write(this, 0, nullptr);
239
240 ss->set_inactivity_timeout(ss->get_netvc()->get_inactivity_timeout());
241 ss->cancel_active_timeout();
242
243 // put it in the pools.
244 this->addSession(ss);
245
246 Dbg(dbg_ctl_http_ss,
247 "[%" PRId64 "] [release session] "
248 "session placed into shared pool",
249 ss->connection_id());
250}
251
252// Called from the NetProcessor to let us know that a
253// connection has closed down

Callers 1

release_sessionMethod · 0.80

Calls 9

addSessionMethod · 0.95
do_io_readMethod · 0.45
get_remote_readerMethod · 0.45
do_io_writeMethod · 0.45
get_netvcMethod · 0.45
cancel_active_timeoutMethod · 0.45
connection_idMethod · 0.45

Tested by

no test coverage detected