T thisismrb Member Sep 3, 2020 #1 Hello, I tried to stop uploading by closing the CountingInputStream. However, it doesn't work and Job continues uploading. UploadService: Sub Cancel_Upload EndTimer For Each job As HttpJob In jobs.Values job.cancelUpload job.cin.Close CallSub(Main,"Kill_upload") Next End Sub HttpJob: Public Sub cancelUpload If cin<>Null And cin.IsInitialized Then cin.Close JobName = "Cancel" End If lTotalSize=-1 End Sub
Hello, I tried to stop uploading by closing the CountingInputStream. However, it doesn't work and Job continues uploading. UploadService: Sub Cancel_Upload EndTimer For Each job As HttpJob In jobs.Values job.cancelUpload job.cin.Close CallSub(Main,"Kill_upload") Next End Sub HttpJob: Public Sub cancelUpload If cin<>Null And cin.IsInitialized Then cin.Close JobName = "Cancel" End If lTotalSize=-1 End Sub
Erel B4X founder Staff member Licensed User Longtime User Sep 4, 2020 #2 Best way to cancel requests is with RequestsManager class. It is available in the Pleroma client: https://www.b4x.com/android/forum/t...leroma-mastodon-client-step-1.119426/#content Upvote 0
Best way to cancel requests is with RequestsManager class. It is available in the Pleroma client: https://www.b4x.com/android/forum/t...leroma-mastodon-client-step-1.119426/#content