You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Send a request that uploads a file, like sending a message with an attachment
Have the request fail with a retryable code (in my case I came across a 504 Gateway Timeout)
Expected Behavior:
I expect files to be properly uploaded after retry
Actual Behavior:
It will result in zero-byte files being uploaded. This is because the InputStream provided by the user has already been consumed and closed during the first request attempt.
Version:
Discord4J 3.2.6
In this scenario I think the best option is never to retry requests that accept an InputStream. Another option would be to allow passing a Supplier<InputStream> or something similar, but I feel like it would complicate things both for the user and the d4j API.
The text was updated successfully, but these errors were encountered:
To Reproduce:
Expected Behavior:
I expect files to be properly uploaded after retry
Actual Behavior:
It will result in zero-byte files being uploaded. This is because the
InputStream
provided by the user has already been consumed and closed during the first request attempt.Version:
Discord4J 3.2.6
In this scenario I think the best option is never to retry requests that accept an
InputStream
. Another option would be to allow passing aSupplier<InputStream>
or something similar, but I feel like it would complicate things both for the user and the d4j API.The text was updated successfully, but these errors were encountered: