Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/file/file_service_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,11 @@ func (fso *FileServiceOperator) sendFileUpdateStreamChunks(
chunkID++
}

return nil
// Ensure the stream is closed and wait for the server's response only
// after all chunks are sent
_, err = updateFileStreamClient.CloseAndRecv()

return err
}

func (fso *FileServiceOperator) sendFileUpdateStreamChunk(
Expand Down
2 changes: 2 additions & 0 deletions test/mock/grpc/mock_management_file_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ func (mgs *FileService) UpdateFileStream(streamingServer grpc.ClientStreamingSer
return writeChunkedFileError
}

streamingServer.SendAndClose(&v1.UpdateFileResponse{})

return nil
}

Expand Down
Loading