Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
3bcb501c
Commit
3bcb501c
authored
Aug 09, 2018
by
Janoš Guljaš
Committed by
Balint Gabor
Aug 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm/api: close tar writer in GetDirectoryTar to flush and clean (#17339)
parent
d3e4c2dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
api.go
swarm/api/api.go
+4
-0
No files found.
swarm/api/api.go
View file @
3bcb501c
...
...
@@ -525,6 +525,10 @@ func (a *API) GetDirectoryTar(ctx context.Context, uri *URI) (io.ReadCloser, err
return
nil
})
// close tar writer before closing pipew
// to flush remaining data to pipew
// regardless of error value
tw
.
Close
()
if
err
!=
nil
{
apiGetTarFail
.
Inc
(
1
)
pipew
.
CloseWithError
(
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment