Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestStream with timeout context doesn't work #112

Open
aiakit opened this issue May 26, 2021 · 2 comments
Open

RequestStream with timeout context doesn't work #112

aiakit opened this issue May 26, 2021 · 2 comments
Labels

Comments

@aiakit
Copy link

aiakit commented May 26, 2021

f = cli.client.RequestStream(payload.New(req.Bytes(), context.Marshal(c)))

cc, cancel := context.WithTimeout(context.TODO(), timeout)

f.
SubscribeOn(scheduler.Parallel()).
DoFinally(func(s rx.SignalType) {
//todo handler rx.SignalType
cancel()
close(rsp)
close(errs)
}).
Subscribe(
cc,
rx.OnNext(func(p payload.Payload) error {
rsp <- payload.Clone(p).Data()
return nil
}),
rx.OnError(func(e error) {
errs <- e
}),
)

@jjeffcaii jjeffcaii changed the title requestStream 超时不生效 RequestStream with timeout context doesn't work Jun 3, 2021
@jjeffcaii
Copy link
Member

Sorry for the late reply, I will check the timeout logic once I have time.

@jjeffcaii
Copy link
Member

The current Flux Processor doesn't support Context API, it will be supported in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants