Skip to content

Commit

Permalink
respect context cancellation in add
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
  • Loading branch information
whyrusleeping committed Jun 23, 2016
1 parent 8e505f2 commit f26d8c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ You can now refer to the added file in a gateway, like so:
bar.ShowBar = true
bar.ShowTimeLeft = true
}
case <-req.Context().Done():
res.SetError(req.Context().Err(), cmds.ErrNormal)
return
}
}
},
Expand Down

0 comments on commit f26d8c7

Please sign in to comment.