[undertow-dev] dispatch and isDispatched do not agree

Oliver Dain oliver at analyticspot.com
Tue Nov 22 15:44:36 EST 2016


I've got some pretty simple code that looks something like:

if (!exhange.isDispatched()) {
    exchange.dispatch(() -> {
        assert exchange.isDispatched();
         // more stuff....
    });
}

but the assert fails. That is, when dispatch calls my runnable isDispatched
is not true.

I believe I have a bug somewhere with how/when dispatches are happening so
I've littered my code with such asserts and they fail reliably even when
I'm quite sure the exchange has been dispatched (e.g. when it is literally
the first call in a Runnable passed to to the dispatch() method).

What am I doing wrong?
-- 
CTO, Analytic Spot
44 West Broadway #222
Eugene, OR 97401
analyticspot.com • 425-296-6556
www.linkedin.com/in/oliverdain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20161122/676faec6/attachment.html 


More information about the undertow-dev mailing list