fix flaky test where code can be 'cancelled' unexpectedly, instead of some error code provided by the server

This commit is contained in:
Josh Humphries 2019-02-27 18:09:27 -05:00
parent b292d5aef8
commit 6bfec056ba
1 changed files with 1 additions and 1 deletions

View File

@ -311,6 +311,7 @@ func invokeBidi(ctx context.Context, stub grpcdynamic.Stub, md *desc.MethodDescr
}
if err != nil {
err = fmt.Errorf("error getting request data: %v", err)
cancel()
break
}
@ -321,7 +322,6 @@ func invokeBidi(ctx context.Context, stub grpcdynamic.Stub, md *desc.MethodDescr
if err != nil {
sendErr.Store(err)
cancel()
}
}()
}