Expected Behavior
Actual Behavior
发生异常: panic
"unreachable: should never occur socket.requestChannelCallback!"
Steps to Reproduce
rsocket.RequestChannel(func(remote flux.Flux) flux.Flux {
var sub rx.Subscription
remote.Subscribe(
context.Background(),
rx.OnSubscribe(func(ctx context.Context, s rx.Subscription) {
sub = s
sub.Request(1)
}),
rx.OnComplete(func() {
print()
}),
rx.OnError(func(e error) {
print()
}),
rx.OnNext(func(input payload.Payload) error {
sub.Cancel() //for some reason,i don't want continue
return nil
}),
)
return flux.Create(func(ctx context.Context, s flux.Sink) {})
}),
Possible Solution
switch vv := v.(type) {
case requestResponseCallbackReverse:
vv.su.Cancel()
case requestStreamCallbackReverse:
vv.su.Cancel()
case requestChannelCallback:
vv.snd.Cancel() //should i?
case respondChannelCallback:
vv.snd.Cancel()
default:
panic(fmt.Sprintf("unreachable: should never occur %T!", vv))
}
Your Environment
- RSocket version(s) used:
- Other relevant libraries versions (eg.
netty, ...):
- Platform (eg. JVM version (
javar -version) or Node version (node --version)):
- OS and version (eg
uname -a):
Expected Behavior
Actual Behavior
发生异常: panic
"unreachable: should never occur socket.requestChannelCallback!"
Steps to Reproduce
Possible Solution
Your Environment
netty, ...):javar -version) or Node version (node --version)):uname -a):