Xojo.Net.HTTPSocket.FileReceived - But file is incomplete?

I’m having trouble trying to use Kaju in a project. We’re using the new ExecuteAsync function because the classic socket isn’t getting a response from the web server for the UpdateInformation.json file, and the eventual download is hosted on Amazon S3. The async function / namespaced framework socket is able to fetch the update information and begin a download from Amazon S3.

However the trouble comes at the end of the download, the Xojo.Net.HTTPSocket’s FileReceived event is raised - but occasionally the download is not complete. For me, it’s frequently missing the last 4kb. This makes the archive corrupt, and unable to extract. Ultimately, it presents as a signature verification failure in Kaju.

I have tried to work around this as a possible timing issue by adding a timer delay to the event, handling it almost one second later; but that does not seem to have had an effect. The download completes just fine if downloaded by a web browser. The download size is roughly 620mb.

Has anyone seen this Xojo.Net.HTTPSocket behavior before?

Does anyone know of any workarounds, or is there a process I can use to try to debug this?

I am reluctant to file a bug report, because the behavior is intermittent; however it’s clearly an issue.