Skip to content

Commit 204092c

Browse files
committed
Call setMaxPendingBytesPerConnection() at the right time.
1 parent 760d752 commit 204092c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/main/java/com/ning/http/client/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -403,21 +403,17 @@ public void onTimeout(Connection connection) {
403403
}
404404
fcb.add(eventFilter);
405405
fcb.add(clientFilter);
406-
407-
if (providerConfig != null) {
408-
final TransportCustomizer customizer = (TransportCustomizer)
409-
providerConfig.getProperty(TRANSPORT_CUSTOMIZER);
410-
if (customizer != null) {
411-
customizer.customize(clientTransport, fcb);
412-
} else {
413-
doDefaultTransportConfig();
414-
}
406+
clientTransport.getAsyncQueueIO().getWriter()
407+
.setMaxPendingBytesPerConnection(AsyncQueueWriter.AUTO_SIZE);
408+
final TransportCustomizer customizer = (TransportCustomizer)
409+
providerConfig.getProperty(TRANSPORT_CUSTOMIZER);
410+
if (customizer != null) {
411+
customizer.customize(clientTransport, fcb);
415412
} else {
416413
doDefaultTransportConfig();
417414
}
418415
fcb.add(new WebSocketFilter());
419-
clientTransport.getAsyncQueueIO().getWriter()
420-
.setMaxPendingBytesPerConnection(AsyncQueueWriter.AUTO_SIZE);
416+
421417
clientTransport.setProcessor(fcb.build());
422418

423419
}

0 commit comments

Comments
 (0)