| 223 | } |
| 224 | |
| 225 | void |
| 226 | ServerSessionPool::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 |
no test coverage detected