content: close stream after commit request
This allows both client and server to determine when
stream is completed. Previously this was done by
closesend call from the client side but that is async
so client can not assume that the server side also
already thinks that stream is complete.
@@ -423,6 +423,10 @@ func (s *service) Write(session api.Content_WriteServer) (err error) {
return err
}
+ if req.Action == api.WriteActionCommit {
+ return nil
+ }
+
req, err = session.Recv()
if err != nil {
if err == io.EOF {
