Skip to content

RequestStream with timeout context doesn't work #112

@aiakit

Description

@aiakit

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
}),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions