In general if there is a read timeout it is because something has gone
wrong with the connection or the client, it is very unlikely that
sending a response will actually succeed, and could just result in a
write timeout.
That is why we just close the connection on read timeout, without
trying to send any sort of response.
Stuart
On Thu, Nov 3, 2016 at 1:00 AM, Вячеслав А <slavastap(a)gmail.com> wrote:
In our project we use Undertow in WildFly application server.
Also we set Read Time Out limits for Undertow.
As we can understand, Read Time Out managed by
ReadTimeoutStreamSourceConduit class.
At Read Time Out moment will be called IoUtils.safeClose and resources will
be closed.
But we want to return message with TimeOut code (
StatusCodes.REQUEST_TIME_OUT ).
How can we properly close Exchange and return code to client as response?
I tried to handle in exchange.getConnection().addCloseListener , but i cant
find a way to return code.
Also, i found Test
/undertow-core/src/test/java/io/undertow/server/ReadTimeoutTestCase.java,
but it doesnt work.
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev