ERROR Channel is closed when streaming server close as expected
when using grpc_async_await(req) in streaming client.
ERROR Channel is closed is thrown when streaming server close as expected like
ERROR: LoadError: InvalidStateException: Channel is closed.
Stacktrace:
[1] grpc_async_await(req::gRPCRequest)
@ gRPCClient ~/.julia/packages/gRPCClient/WDUmV/src/gRPC.jl:153
[2] top-level scope
@ ~/doc/Timberjack/scripts/runRtPrice.jl:23
[3] include(mod::Module, _path::String)
@ Base ./Base.jl:306
[4] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:317
[5] _start()
@ Base ./client.jl:550
in expression starting at /home/user1/doc/Timberjack/scripts/runRtPrice.jl:23
Should exit normally without throwing the error.
EDIT: don' t use grpc_async_await(req) is fine.
Yes, we should not be raising this exception here. Working on a fix now.
@xgdgsc is this happening with response or bidirectional RPC? Trying to narrow down exactly where the exception is not being handled properly. From first glance it appears all uses of streaming channels will properly handle InvalidStateException. We use a channel as a semaphore to reduce allocations, but that shouldn't be closed unless close(::gRPCCURL) is called somewhere.
Do you get any other error messages printed out?
No. I don' t use bidirectional, just one direction streaming RPC.
Are there any @error logged besides the exception?