Skip to content

Commit

Permalink
content: close stream after commit request
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Oct 22, 2021
1 parent 9d5c116 commit 010a9e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/content/contentserver/contentserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 010a9e2

Please sign in to comment.