Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit 79b0e6c

Browse files
committed
fix request channel not found exception with named socket and fixed name socket wrapper to send data
1 parent 7344490 commit 79b0e6c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

proteus-client/src/main/java/io/netifi/proteus/rsocket/NamedRSocketClientWrapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import io.netty.buffer.ByteBufAllocator;
55
import io.rsocket.Payload;
66
import io.rsocket.RSocket;
7-
import io.rsocket.rpc.RSocketRpcService;
87
import io.rsocket.rpc.frames.Metadata;
98
import io.rsocket.util.ByteBufPayload;
109
import io.rsocket.util.RSocketProxy;
@@ -22,7 +21,7 @@ private NamedRSocketClientWrapper(String name, RSocket source) {
2221
}
2322

2423
/**
25-
* Wraps an RSocket with {@link RSocketProxy} and {@link RSocketRpcService}
24+
* Wraps an RSocket with {@link RSocketProxy} and RSocketRpcService
2625
*
2726
* @param name what you want your RSocket to be found as
2827
* @param source the raw socket to handle to wrap
@@ -63,6 +62,6 @@ private Payload wrap(Payload payload) {
6362
ByteBuf metadata =
6463
Metadata.encode(ByteBufAllocator.DEFAULT, name, name, payload.sliceMetadata());
6564

66-
return ByteBufPayload.create(payload.sliceMetadata().retain(), metadata);
65+
return ByteBufPayload.create(payload.sliceData().retain(), metadata);
6766
}
6867
}

proteus-client/src/main/java/io/netifi/proteus/rsocket/NamedRSocketServiceWrapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public String getService() {
4848
}
4949

5050
@Override
51-
public final Flux<Payload> requestChannel(Payload payload, Flux<Payload> publisher) {
52-
return reactor.core.publisher.Flux.error(
53-
new UnsupportedOperationException("Request-Channel not implemented."));
51+
public Flux<Payload> requestChannel(Payload payload, Flux<Payload> publisher) {
52+
return super.requestChannel(publisher);
5453
}
5554
}

0 commit comments

Comments
 (0)