Skip to content

Commit 12d2f41

Browse files
committed
okhttp: remove 4096 min buffer size
1 parent b1bc0a9 commit 12d2f41

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

okhttp/src/main/java/io/grpc/okhttp/OkHttpWritableBufferAllocator.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
*/
2828
class OkHttpWritableBufferAllocator implements WritableBufferAllocator {
2929

30-
// Use 4k as our minimum buffer size.
31-
private static final int MIN_BUFFER = 4096;
32-
3330
// Set the maximum buffer size to 1MB
3431
private static final int MAX_BUFFER = 1024 * 1024;
3532

@@ -45,7 +42,7 @@ class OkHttpWritableBufferAllocator implements WritableBufferAllocator {
4542
*/
4643
@Override
4744
public WritableBuffer allocate(int capacityHint) {
48-
capacityHint = Math.min(MAX_BUFFER, Math.max(MIN_BUFFER, capacityHint));
45+
capacityHint = Math.min(MAX_BUFFER, capacityHint);
4946
return new OkHttpWritableBuffer(new Buffer(), capacityHint);
5047
}
5148
}

0 commit comments

Comments
 (0)