Public Sub downloadFile(ByVal url As String)
        LogFile.displayMessage("add url=" & url)
        downloadURLs.Enqueue(url)
        If t Is Nothing Then
            LogFile.displayMessage("create new thread")
            t = New Thread(AddressOf ThreadedDownloadFile)
        End If
        If Not t.IsAlive Then
            LogFile.displayMessage("start thread")
            t.Start()
        End If
    End Sub
 Private Sub download()
        LogFile.displayMessage("thread running count=" & downloadURLs.Count)
        If downloadURLs.Count > 0 Then
            Dim client = New WebClient()
            AddHandler client.DownloadFileCompleted, AddressOf downloadFileCompleted
            AddHandler client.DownloadProgressChanged, AddressOf downloadProgressChanged
            Dim url = downloadURLs.Dequeue()
            LogFile.displayMessage("downloading url=" & url)
            url = WebRequest.Create(url).GetResponse.ResponseUri.AbsoluteUri
            Dim fileName = url.Substring(url.LastIndexOf("/") + 1)
            progress = 0
            LogFile.displayMessage("downloading NOW NOW NOW url=" & url)
            client.DownloadFile(New Uri(url), localAddress & fileName)
        End If
        LogFile.displayMessage("thread end")
    End Sub
    Private Sub downloadFileCompleted() 'ByVal sender As Object, ByVal e As DownloadStringCompletedEventArgs)
        LogFile.displayMessage("download complete ") ' & e.Result)
        LogFile.displayMessage("set next download going")
        download()
    End Sub
しかし、2 回目のラウンドで URL を取得し、ダウンロード ファイルで停止します。また、これを行いdownloadfileasyncます。
私はこれについて議論している多くのウェブページを見てきましたが、それを修正するものはありません
これを修正する方法を知っている人はいますか?
追加の詳細
私は新しいスレッドを開始しますが、どのように実行しても、webclient.downloadfileまたはdownloadfileasyncなどはすべて最初はうまく機能しているように見えますが、2回目の呼び出しでは、ファイルが表示されるとダウンロードするように見えますが、プログレスコールは行われず、完了することはありません。
私は破棄しようとしましたが、それを何もせず、再宣言し、破棄後にガベージコレクションを強制することさえしました。
しかし、それはまだ働きたくありません。
ストリーム経由で自分で転送することを検討しています