~ps10gel/ubuntu/xenial/trafficserver/6.2.0

« back to all changes in this revision

Viewing changes to proxy/http/HttpSessionManager.cc

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2013-05-09 01:00:04 UTC
  • mto: (1.1.11) (5.3.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20130509010004-9fqq9n0adseg3f8w
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
  HttpServerSession *s = NULL;
73
73
 
74
74
  switch (event) {
 
75
  case EVENT_INTERVAL:
 
76
    s = (HttpServerSession *)(((Event *)data)->cookie);
 
77
    httpSessionManager.release_session(s);
 
78
    return 0;
75
79
  case VC_EVENT_READ_READY:
76
80
    // The server sent us data.  This is unexpected so
77
81
    //   close the connection
301
305
    bucket = g_l1_hash + l1_index;
302
306
  }
303
307
 
 
308
  // Transfer control of the write side as well
 
309
  to_release->do_io_write(bucket, 0, NULL);
 
310
  to_release->do_io_read(bucket, 0, NULL);
 
311
 
304
312
  MUTEX_TRY_LOCK(lock, bucket->mutex, ethread);
305
313
  if (lock) {
306
314
    int l2_index = SECOND_LEVEL_HASH(&to_release->server_ip.sa);
318
326
    //  to remove the connection from our lists
319
327
    to_release->do_io_read(bucket, INT64_MAX, to_release->read_buffer);
320
328
 
321
 
    // Transfer control of the write side as well
322
 
    to_release->do_io_write(bucket, 0, NULL);
323
 
 
324
329
    // we probably don't need the active timeout set, but will leave it for now
325
330
    to_release->get_netvc()->set_inactivity_timeout(to_release->get_netvc()->get_inactivity_timeout());
326
331
    to_release->get_netvc()->set_active_timeout(to_release->get_netvc()->get_active_timeout());
328
333
 
329
334
    return HSM_DONE;
330
335
  } else {
 
336
    eventProcessor.schedule_in(bucket, HRTIME_MSECONDS(5), ET_CALL, EVENT_INTERVAL, (void *) to_release);
331
337
    Debug("http_ss", "[%" PRId64 "] [release session] could not release session due to lock contention", to_release->con_id);
332
338
  }
333
339