Advertisement
Guest User

Untitled

a guest
Mar 14th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LDIF 1.56 KB | None | 0 0
  1. diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
  2. index ad08f8f54..6a85b426b 100644
  3. --- a/iocore/cache/Cache.cc
  4. +++ b/iocore/cache/Cache.cc
  5. @@ -328,9 +328,9 @@ CacheVC::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *abuf)
  6.    vio.nbytes    = nbytes;
  7.    vio.vc_server = this;
  8.  #ifdef DEBUG
  9. -  ink_assert(c->mutex->thread_holding);
  10. +  ink_assert(!c || c->mutex->thread_holding);
  11.  #endif
  12. -  if (!trigger && !recursive)
  13. +  if (c && !trigger && !recursive)
  14.      trigger = c->mutex->thread_holding->schedule_imm_local(this);
  15.    return &vio;
  16.  }
  17. @@ -364,9 +364,9 @@ CacheVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuf, bool
  18.    vio.nbytes    = nbytes;
  19.    vio.vc_server = this;
  20.  #ifdef DEBUG
  21. -  ink_assert(c->mutex->thread_holding);
  22. +  ink_assert(!c || c->mutex->thread_holding);
  23.  #endif
  24. -  if (!trigger && !recursive)
  25. +  if (c && !trigger && !recursive)
  26.      trigger = c->mutex->thread_holding->schedule_imm_local(this);
  27.    return &vio;
  28.  }
  29. diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
  30. index 403c6fd3e..aa5d1a0b0 100644
  31. --- a/proxy/http/HttpTunnel.cc
  32. +++ b/proxy/http/HttpTunnel.cc
  33. @@ -1255,6 +1255,9 @@ HttpTunnel::producer_handler(int event, HttpTunnelProducer *p)
  34.      if (p->alive) {
  35.        p->alive      = false;
  36.        p->bytes_read = p->read_vio->ndone;
  37. +      // Clear any outstanding reads so they don't
  38. +      // collide with future tunnel IO's
  39. +      p->vc->do_io_read(nullptr, 0, 0);
  40.        // Interesting tunnel event, call SM
  41.        jump_point = p->vc_handler;
  42.        (sm->*jump_point)(event, p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement