Apply 1 suggestion(s) to 1 file(s)

This commit is contained in:
Michal Horejsek
2021-01-13 08:22:05 +00:00
parent 2feaba8888
commit 8cd17addbe

View File

@ -186,8 +186,8 @@ func (c *client) CreateAttachment(att *Attachment, r io.Reader, sig io.Reader) (
}
cx, cancel := context.WithCancel(req.Context())
req = req.WithContext(cx)
defer cancel()
req = req.WithContext(cx)
// We will write the request as long as it is sent to the API.
var res CreateAttachmentRes