Skip to content

Commit 50b1efb

Browse files
authored
Add support for method return ByteBuf
1 parent f6b9683 commit 50b1efb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services-bytebuf-codec/src/main/java/io/scalecube/services/transport/api/ServiceMessageCodec.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ public static ServiceMessage decodeData(ServiceMessage message, Type dataType)
157157
throws MessageCodecException {
158158
if (dataType == null
159159
|| !message.hasData(ByteBuf.class)
160-
|| ((ByteBuf) message.data()).readableBytes() == 0) {
160+
|| ((ByteBuf) message.data()).readableBytes() == 0
161+
|| ByteBuf.class == dataType) {
161162
return message;
162163
}
163164

0 commit comments

Comments
 (0)