10000 TupleByteBuf is not writable · making/rsocket-java@15ee7d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 15ee7d3

Browse files
committed
TupleByteBuf is not writable
Signed-off-by: Maksym Ostroverkhov <m.ostroverkhov@gmail.com>
1 parent eb3ba18 commit 15ee7d3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
#
14-
version=1.0.0-RC5
14+
version=1.0.0-RC6-SNAPSHOT

rsocket-core/src/main/java/io/rsocket/buffer/AbstractTupleByteBuf.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ abstract class AbstractTupleByteBuf extends AbstractReferenceCountedByteBuf {
1616
static final int DEFAULT_DIRECT_MEMORY_CACHE_ALIGNMENT =
1717
SystemPropertyUtil.getInt("io.netty.allocator.directMemoryCacheAlignment", 0);
1818
static final ByteBuffer EMPTY_NIO_BUFFER = Unpooled.EMPTY_BUFFER.nioBuffer();
19+
static final int NOT_ENOUGH_BYTES_AT_MAX_CAPACITY_CODE = 3;
1920

2021
final ByteBufAllocator allocator;
2122
final int capacity;
@@ -294,7 +295,7 @@ public ByteBuf ensureWritable(int minWritableBytes) {
294295

295296
@Override
296297
public int ensureWritable(int minWritableBytes, boolean force) {
297-
return 0;
298+
return NOT_ENOUGH_BYTES_AT_MAX_CAPACITY_CODE;
298299
}
299300

300301
@Override

0 commit comments

Comments
 (0)
0