<div dir="auto"><div>Well, if the exchange has completed, then it seem quite appropriate to fire the exchange complete listener.  Especially if you have logic and/or logging that you want to make sure runs at the end of every request.  <br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 5, 2020, 10:43 PM Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I guess that would work as well, it&#39;s maybe a bit weird as in this case the proceed() invocation is a noop, but I think that is ok.</div><div><br></div><div>Stuart<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 6 Jul 2020 at 13:34, Brad Wood &lt;<a href="mailto:bdw429s@gmail.com" target="_blank" rel="noreferrer">bdw429s@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Why shouldn&#39;t it just fire in that case? That would certainly follow the principle of least astonishment.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 5, 2020, 10:30 PM Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com" target="_blank" rel="noreferrer">sdouglas@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>It should probably throw an exception in this case. <br></div><div><br></div><div>Stuart<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 4 Jul 2020 at 09:06, Brad Wood &lt;<a href="mailto:bdw429s@gmail.com" rel="noreferrer noreferrer" target="_blank">bdw429s@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have a basic exchange listener configured for testing that simply logs at the end of each request something like <div><br><font face="monospace">exchange.addExchangeCompleteListener((httpServerExchange, nextListener) -&gt; {<br>    if (httpServerExchange.getStatusCode() &gt; 399) {<br>      

    

CONTEXT_LOG.warnf(&quot;responded: Status Code %s (%s)&quot;, httpServerExchange.getStatusCode(), fullExchangePath(httpServerExchange));<br>

    

}<br>

    

nextListener.proceed();<br>});</font><br></div><div><br></div><div>This works great, but if the exchange is ended-- for example using the response-code handler-- then the exchange complete listener never fires.</div><div><br></div><div>Is this working as designed?</div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div></div><div>Thanks!</div><div><br></div><div>~Brad</div><div><br></div><div><b>Developer Advocate</b></div><div><i>Ortus Solutions, Corp </i></div><div><b><br></b></div><div>E-mail: <a href="mailto:brad@coldbox.org" rel="noreferrer noreferrer" target="_blank">brad@coldbox.org</a></div><div>ColdBox Platform: <a href="http://www.coldbox.org" rel="noreferrer noreferrer" target="_blank">http://www.coldbox.org</a> </div><div>Blog: <a href="http://www.codersrevolution.com" rel="noreferrer noreferrer" target="_blank">http://www.codersrevolution.com</a></div><div><br></div></div></div></div></div></div></div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" rel="noreferrer noreferrer" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div></div></div>