Hi All,
I have implemented Async streaming server and to post data to client i am using ServerAsyncWriter api. I am facing a issue in this api in below mentioned scenario :
- Server is up and running
- clients are connected and at a specified timer, i am posting data to clients
- from other thread i shutdown the grpc server, and before calling shutdown on Server and completionQueue, i call FINISH() on ServerAsyncWriter and set the CallData state as FINISH.
- As soon as FINISh() api is called on ServerAsyncWriter , server completionQueue recieves a notification and i call proceed on the returned tag.
-- Since CallData state is FINISH now, i am deleting my CallData object.
- But the issue is, that after calling FINISH on ServerAsyncWriter , my server completionQueue is receiving 2 events on for same CallData and proceed is called twice causing double deletion.
- I am not sure why my completionQueue is receiving 2 events, is it a desired behavior or am i missing something.
**GRPC version : 11
Thanks
Chaitanya