When I use an interceptor to authenticate clients (in bi-directional streaming scenarios), if unauthenticated clients refuse to shutdown their channels, how can I forcefully close connections and reclaim opened file descriptors?
Here's the code for the interceptor (assuming that I reject all gRPC calls) and it doesn't work.
@Override public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall( ServerCall<ReqT, RespT> call, final Metadata requestHeaders, ServerCallHandler<ReqT, RespT> next) { call.close(Status.CANCELLED, requestHeaders); return new ServerCall.Listener() { }; }