Skip to content

Commit 9d62925

Browse files
committed
Call setMaxPendingBytesPerConnection() at the right time.
1 parent 425c862 commit 9d62925

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ public void onTimeout(Connection connection) {
359359
secure.add(clientFilter);
360360
secure.add(new WebSocketClientFilter());
361361

362-
362+
clientTransport.getAsyncQueueIO().getWriter()
363+
.setMaxPendingBytesPerConnection(AUTO_SIZE);
363364
if (providerConfig != null) {
364365
final TransportCustomizer customizer = (TransportCustomizer)
365366
providerConfig.getProperty(Property.TRANSPORT_CUSTOMIZER);
@@ -383,10 +384,6 @@ public void onTimeout(Connection connection) {
383384
.setClientSideNegotiator(clientTransport, pn);
384385
}
385386

386-
// Don't limit the number of bytes the client can have queued to write.
387-
clientTransport.getAsyncQueueIO().getWriter()
388-
.setMaxPendingBytesPerConnection(AUTO_SIZE);
389-
390387
// Install the HTTP filter chain.
391388
//clientTransport.setProcessor(fcb.build());
392389
FilterChainBuilder nonSecure = FilterChainBuilder.stateless();

0 commit comments

Comments
 (0)