Calling stream.WriteDone can't close watch stream.
And I found a commit here change the behaviour than also wait for the send routine. https://github.com/etcd-io/etcd/commit/c43831063411d923566f1c607933c1d721c1f5f2
Is there any way to close the watch stream from client side ?
@kghost is this doc helpful? - https://github.com/etcd-io/etcd/blob/master/clientv3/watch.go#L45 Thanks!
I'm direct access etcd via grpc using c++.I don't know how go client works. AFAIK, there are something we can improve.
Documents the API in the protobuf file, not go client. Not everybody use go client
Client can't close the steam, client need to wait until server decide to close the stream. It may not be a problem in golang, as go has gc and go routine, resources and routines can be freed afterwards. But it can cause problems in c++, it is very inconvenient to wait for server to destroy or deallocate objects.
@kghost Could you try sending a cancel request [1]?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.