Hi, If I send EOS (or ERROR for that matter) to the write side, I don't get a crash and the transform completes (apparently) cleanly. However the connection is not terminated, it's just the transform that gets truncated, as Nick pointed out before. And that's just as easy to do by adjusting VIO nbytes.
Last evening I did manage to terminate the connection without a crash, but not in such a clean way: - grab the client socket fd with TSHttpTxnClientFdGet - shutdown both ends of it - destroy the continuation data - destroy the continuation The client does get disconnected with a read error (as far as I've tested) consistently, which is what I want, and traffic server doesn't crash. But is this enough cleanup to ensure nothing is left hanging or leaking? Br, Carlos On Wed, Oct 30, 2013 at 12:32 AM, Alan M. Carroll < a...@network-geographics.com> wrote: > How do you return the EOS event? You would need to do it in response to a > normal IO call, instead of return WRITE_READY or similar. If you've already > read all the input, you'd need to return it on the write side. > > You might adjusting the VIO nbytes to convince the VIO that it's finished > all of its writing. > > I'm fighting with the same issue inside ATS, terminating a connection / > tunnel cleanly without crashing. > > Tuesday, October 29, 2013, 7:40:43 AM, you wrote: > > > A note about the operation of the plugin. > > The decision to abort the connection typically happens after all input > has > > been read, but before writing all the output. > > The plugin withholds (in a buffer) a certain amount of tail output, until > > it can be sure that the connection will not have to be aborted - that > > decision is dependent on the entire input. > > If everything is OK, the remaining withheld data is written out, > otherwise > > the transaction should be aborted. > > >