Sub JobDone(Job As HttpJob)
If Job.JobName="Job1" And InterNetJob.Success=False Then
InternetAccess = False
Else
InternetAccess = True
End If
Job.Release
End Sub
The problem is that it does not go through the sub.
Dim xrs As ResumableSub = TestInternet
Wait for (xrs) Complete(InternetAccess As Boolean)
Log("there is internet: " & InternetAccess)
With this sub:
Sub:
private Sub TestInternet As ResumableSub
Dim InterNetJob As HttpJob
InterNetJob.Initialize("",Me)
InterNetJob.Download("https://www.google.com")
Wait For (InterNetJob) JobDone(Job As HttpJob)
Return InterNetJob.Success
End Sub