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:
Igor Bernstein 2018-05-03 12:00:38 -04:00 коммит произвёл dfawley
Родитель e9443916b5
Коммит ed2472917f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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
}