﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
437	InetGet in background mode - loop not responding when site overloaded	Zedna		"InetGet in background mode - loop not responding

I have created small utility Radar 
which downloads actual Czech meteorological radar pictures 
and shows them on my GUI in loop (animation).

See whole code/screenshot in this topic in Examples forum:
[http://www.autoitscript.com/forum/index.php?showtopic=75659]

But sometimes when WWW site is overloaded my While @InetGetActive loop is not responsive.
It should go through my loop and show progress of download
but there is executed only few (or no) loop cycles when site is overloaded
so user can't see progress or stop downloading.

Note: Normally when WWW site is working fine all in my script is working fine too
also with stopping download by Esc key

Here is commented core code:


{{{
 Status(""Stahování dat "" & $i+1 & ""/"" & $pocet_snimku) ; set statusbar text: Download of data 1/6
 $cas1 = TimerInit()

 Inetget($adresa & ""data/"" & $nazvy[$i], $soubor, 0, 1) ; get GIF file (one of 6 pictures)
 While @InetGetActive
   ; Esc (HotkeySet) can set this global flag/variable when user wants to stop download
 	If $zastavit_stahovani Then 
 		InetGet(""abort"")
 		FileDelete($soubor)
 		ExitLoop 2 ; stop download of all pictures
 	EndIf

 	; if download last more than timeout defined in INI file then abort
 	$cas2 = TimerDiff($cas1)
 	If $cas2 > $timeout Then 
 		InetGet(""abort"")
 		FileDelete($soubor)
 		ExitLoop ; stop download of current picture
 	EndIf

 	; if download last more than 2s then show also % of download progress
 	If $cas2 > 2000 Then
 		Status(""Stahování dat "" & $i+1 & ""/"" & $pocet_snimku & "" ("" & Int(@InetGetBytesRead / $size * 100) & ""%)"")
 		Sleep(250)
 	Else
 		Sleep(50)
 	EndIf
 Wend
}}}
"	Bug	closed		AutoIt	3.2.10.0	None	Wont Fix		
