Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
- index ad08f8f54..6a85b426b 100644
- --- a/iocore/cache/Cache.cc
- +++ b/iocore/cache/Cache.cc
- @@ -328,9 +328,9 @@ CacheVC::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *abuf)
- vio.nbytes = nbytes;
- vio.vc_server = this;
- #ifdef DEBUG
- - ink_assert(c->mutex->thread_holding);
- + ink_assert(!c || c->mutex->thread_holding);
- #endif
- - if (!trigger && !recursive)
- + if (c && !trigger && !recursive)
- trigger = c->mutex->thread_holding->schedule_imm_local(this);
- return &vio;
- }
- @@ -364,9 +364,9 @@ CacheVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuf, bool
- vio.nbytes = nbytes;
- vio.vc_server = this;
- #ifdef DEBUG
- - ink_assert(c->mutex->thread_holding);
- + ink_assert(!c || c->mutex->thread_holding);
- #endif
- - if (!trigger && !recursive)
- + if (c && !trigger && !recursive)
- trigger = c->mutex->thread_holding->schedule_imm_local(this);
- return &vio;
- }
- diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
- index 403c6fd3e..aa5d1a0b0 100644
- --- a/proxy/http/HttpTunnel.cc
- +++ b/proxy/http/HttpTunnel.cc
- @@ -1255,6 +1255,9 @@ HttpTunnel::producer_handler(int event, HttpTunnelProducer *p)
- if (p->alive) {
- p->alive = false;
- p->bytes_read = p->read_vio->ndone;
- + // Clear any outstanding reads so they don't
- + // collide with future tunnel IO's
- + p->vc->do_io_read(nullptr, 0, 0);
- // Interesting tunnel event, call SM
- jump_point = p->vc_handler;
- (sm->*jump_point)(event, p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement