client: fix interceptors after recent cleanup (#2046)
This is a partial revert of #2027 which seems to have broken the ability to inject payload inspecting client interceptors. Specifically it causes this test to break:eb0079f598/bigtable/bigtable_test.go (L949-L971)
With: panic: interface conversion: grpc.ClientStream is *bigtable.requestCountingInterceptor, not *grpc.clientStream [recovered] panic: interface conversion: grpc.ClientStream is *bigtable.requestCountingInterceptor, not *grpc.clientStream Which seems to be caused by invoke() expecting a clientStream from a ClientConn:7c204fd174/call.go (L74)
This commit is contained in:
Родитель
e9443916b5
Коммит
ed2472917f
2
call.go
2
call.go
|
@ -67,7 +67,7 @@ func invoke(ctx context.Context, method string, req, reply interface{}, cc *Clie
|
|||
// newClientStream, SendMsg, RecvMsg.
|
||||
firstAttempt := true
|
||||
for {
|
||||
csInt, err := cc.NewStream(ctx, unaryStreamDesc, method, opts...)
|
||||
csInt, err := newClientStream(ctx, unaryStreamDesc, cc, method, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче