Skip to content

Commit

Permalink
Increases default value of write-buffer-size to 4K. (helidon-io#9190)
Browse files Browse the repository at this point in the history
Signed-off-by: Santiago Pericas-Geertsen <[email protected]>
  • Loading branch information
spericas authored Aug 28, 2024
1 parent af86d0f commit 90274ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ interface ListenerConfigBlueprint {

/**
* Initial buffer size in bytes of {@link java.io.BufferedOutputStream} created internally to
* write data to a socket connection. Default is {@code 512}.
* write data to a socket connection. Default is {@code 4096}.
*
* @return initial buffer size used for writing
*/
@Option.Configured
@Option.DefaultInt(512)
@Option.DefaultInt(4096)
int writeBufferSize();

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Oracle and/or its affiliates.
* Copyright (c) 2023, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,7 +30,7 @@ void testListenerConfig() {
Config config = Config.create();
var webServerConfig = WebServer.builder().config(config.get("server")).buildPrototype();
assertThat(webServerConfig.writeQueueLength(), is(0)); // default
assertThat(webServerConfig.writeBufferSize(), is(512)); // default
assertThat(webServerConfig.writeBufferSize(), is(4096)); // default
assertThat(webServerConfig.shutdownGracePeriod().toMillis(), is(500L)); // default
ListenerConfig listenerConfig2 = webServerConfig.sockets().get("other");
assertThat(listenerConfig2.writeQueueLength(), is(64));
Expand Down

0 comments on commit 90274ad

Please sign in to comment.