Take back ownership of files from aiohttp for retrying requests.

Fix #1809
This commit is contained in:
Rapptz committed 2019-03-18 07:54:36 -04:00
1 parent 8ba48c14a7
commit 5e65ec978c
4 files changed
+62 -22

No files matched your search

+1 -1
View File
@@ -756,7 +756,7 @@ class Messageable(metaclass=abc.ABCMeta):
raise InvalidArgument('file parameter must be File')
try:
data = await state.http.send_files(channel.id, files=[(file.open_file(), file.filename)],
data = await state.http.send_files(channel.id, files=[file],
content=content, tts=tts, embed=embed, nonce=nonce)
finally:
file.close()