[undertow-dev] Undertow Read TimeOut Response

Stuart Douglas sdouglas at redhat.com
Wed Nov 2 17:36:21 EDT 2016


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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev



More information about the undertow-dev mailing list