Increase memory available to Netty client for websocket frames
import com.google.auto.service.AutoService;
import org.asynchttpclient.AsyncHttpClient;
+import org.asynchttpclient.DefaultAsyncHttpClientConfig;
import org.asynchttpclient.Dsl;
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.Filter;
public class NettyClient implements HttpClient {
- private static final AsyncHttpClient httpClient = Dsl.asyncHttpClient();
+ private static final AsyncHttpClient httpClient = Dsl.asyncHttpClient(
+ new DefaultAsyncHttpClientConfig.Builder()
+ .setAggregateWebSocketFrameFragments(true)
+ .setWebSocketMaxBufferSize(Integer.MAX_VALUE)
+ .setWebSocketMaxFrameSize(Integer.MAX_VALUE));
private final HttpHandler handler;
private BiFunction<HttpRequest, WebSocket.Listener, WebSocket> toWebSocket;
