Skip to content

Commit d7f0054

Browse files
committed
Chore - Set timeouts for WinHTTP requests
1 parent 6f10db8 commit d7f0054

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

wd_core.au3

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,10 @@ Func __WD_Get($sURL)
13631363
; Initialize and get session handle
13641364
Local $hOpen = _WinHttpOpen()
13651365

1366+
If $_WD_WINHTTP_TIMEOUTS Then
1367+
_WinHttpSetTimeouts($_WD_HTTPTimeOuts[0], $_WD_HTTPTimeOuts[1], $_WD_HTTPTimeOuts[2], $_WD_HTTPTimeOuts[3])
1368+
EndIf
1369+
13661370
; Get connection handle
13671371
Local $hConnect = _WinHttpConnect($hOpen, $aURL[2], $aURL[3])
13681372

@@ -1445,6 +1449,10 @@ Func __WD_Post($sURL, $sData)
14451449
; Initialize and get session handle
14461450
Local $hOpen = _WinHttpOpen()
14471451

1452+
If $_WD_WINHTTP_TIMEOUTS Then
1453+
_WinHttpSetTimeouts($_WD_HTTPTimeOuts[0], $_WD_HTTPTimeOuts[1], $_WD_HTTPTimeOuts[2], $_WD_HTTPTimeOuts[3])
1454+
EndIf
1455+
14481456
; Get connection handle
14491457
Local $hConnect = _WinHttpConnect($hOpen, $aURL[2], $aURL[3])
14501458

@@ -1523,6 +1531,10 @@ Func __WD_Delete($sURL)
15231531
; Initialize and get session handle
15241532
Local $hOpen = _WinHttpOpen()
15251533

1534+
If $_WD_WINHTTP_TIMEOUTS Then
1535+
_WinHttpSetTimeouts($_WD_HTTPTimeOuts[0], $_WD_HTTPTimeOuts[1], $_WD_HTTPTimeOuts[2], $_WD_HTTPTimeOuts[3])
1536+
EndIf
1537+
15261538
; Get connection handle
15271539
Local $hConnect = _WinHttpConnect($hOpen, $aURL[2], $aURL[3])
15281540

0 commit comments

Comments
 (0)