demand before succeeding callback in JettyWebSocketFrameHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
812f3dbd2e
commit
15d4659cc0
|
@ -204,8 +204,17 @@ public class JettyWebSocketFrameHandler implements FrameHandler
|
|||
// Demand after succeeding any received frame
|
||||
Callback demandingCallback = Callback.from(()->
|
||||
{
|
||||
try
|
||||
{
|
||||
demand();
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
callback.failed(t);
|
||||
return;
|
||||
}
|
||||
|
||||
callback.succeeded();
|
||||
demand();
|
||||
},
|
||||
callback::failed
|
||||
);
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
package org.eclipse.jetty.websocket.tests.client;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
|
@ -442,14 +441,10 @@ public class ClientCloseTest
|
|||
session.getRemote().sendString(message);
|
||||
}
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
catch (Throwable t)
|
||||
{
|
||||
LOG.debug("unblocked");
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
catch (IOException ignore)
|
||||
{
|
||||
LOG.debug(ignore);
|
||||
LOG.debug(t);
|
||||
throw new RuntimeException(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue