首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google speech streaming api的Grpc代理服务器没有响应( Grpc.Core.RpcException )

Google speech streaming api的Grpc代理服务器没有响应( Grpc.Core.RpcException )
EN

Stack Overflow用户
提问于 2017-08-03 20:23:20
回答 1查看 1.3K关注 0票数 2

我们正在尝试实现GRPC代理服务器( ASP.NET核心控制台应用程序),它将代理传入的数据到谷歌语音流应用程序接口。代码与sample application中的代码基本相同。

代理服务器的用途是多语言识别和api密钥保护。

出于测试目的,我创建了Windows forms应用程序,它将可用数据(通过DataAvailable处理程序的音频块)发送到代理服务器。服务器开始识别抄本,但在几次识别之后(大约5-10次),它不再响应。实际上,每次从客户端到代理服务器的调用都会超时(截止日期)。

在客户机上,我接收到下一个异常:

代码语言:javascript
复制
    Grpc.Core.RpcException: Status(StatusCode=DeadlineExceeded, Detail="Deadline Exceeded")
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg)
   at Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse](CallInvocationDetails`2 call, TRequest req)
   at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
   at Grpc.Core.Internal.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)

EDIT1 :服务器在此行停止。因此,客户端会收到截止日期异常。

EN

回答 1

Stack Overflow用户

发布于 2017-08-16 19:27:31

事实证明,问题出在服务器端,因为异步操作导致了死锁。

该解决方案描述为here

异步操作上的configureAwait(false)解决了这个问题。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45484096

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档