Skip to content

SharedFlow causes GRPC to duplicate headers #208

@ReginFell

Description

@ReginFell

Hello, we encountered an issue when try to use grpc-kotlin with SharedFlow,

Our use case is:

grpcStub.observeEvents()
   .shareIn(scope, started = SharingStarted.WhileSubscribed())

And first time everything is OK, but once SharedFlow does not have any subscribers it completes itself. After that if we resubscribe to it, Metadata object will contain all headers from the previous connection.

So next time ClientsCalls.kt -> rpcImpl will invoke clientCall.start with outdated meta info.

Any ideas how it can be solved?
Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions