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. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user