B4J Question job1.initialize after job1.release?

techknight

Well-Known Member
Licensed User
Longtime User
Do I have to call job1.initialize for each and every job1.release?

I am downloading files in succession, and it seems to work, but sometimes it doesnt and gives me weird timeout errors.

code:
B4X:
    'Now that we have the filenames for the latest frames, lets download them one by one.
    For I = 0 To FileNames.Length-1
        job1.Download("http://xxxxxxxxxxxxx/files/" & FileNames(I))
        Wait For (job1) JobDone(job1 As HttpJob)
        If job1.Success Then
            Dim out As OutputStream = File.OpenOutput(File.DirApp, i & ".tif", False)
            File.Copy2(job1.GetInputStream, out)
            out.Close
        Else
            Log(job1.ErrorMessage)
            Return 0
        End If
        job1.Release
    Next

thoughts?
 

OliverA

Expert
Licensed User
Longtime User
I would dim a new job for each download
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I will give it a shot and see what happens. I think its a server issue as it used to work fine and now it doesnt. but the server still works in google chrome. go figure.
 
Upvote 0
Top