Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
2db71194
Commit
2db71194
authored
Jul 24, 2014
by
Rafal Nowosielski
Committed by
Rafal Nowosielski
Aug 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set timeout on remote (WinHTTP) to infinite #2147
parent
d28b2b7a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
src/transports/winhttp.c
+8
-0
No files found.
src/transports/winhttp.c
View file @
2db71194
...
...
@@ -212,6 +212,8 @@ static int winhttp_stream_connect(winhttp_stream *s)
BOOL
peerdist
=
FALSE
;
int
error
=
-
1
;
unsigned
long
disable_redirects
=
WINHTTP_DISABLE_REDIRECTS
;
int
default_timeout
=
-
1
;
/* Prepare URL */
git_buf_printf
(
&
buf
,
"%s%s"
,
t
->
connection_data
.
path
,
s
->
service_url
);
...
...
@@ -240,6 +242,8 @@ static int winhttp_stream_connect(winhttp_stream *s)
goto
on_error
;
}
WinHttpSetTimeouts
(
s
->
request
,
default_timeout
,
default_timeout
,
default_timeout
,
default_timeout
);
/* Set proxy if necessary */
if
(
git_remote__get_http_proxy
(
t
->
owner
->
owner
,
!!
t
->
connection_data
.
use_ssl
,
&
proxy_url
)
<
0
)
goto
on_error
;
...
...
@@ -467,6 +471,7 @@ static int winhttp_connect(
int32_t
port
;
const
char
*
default_port
=
"80"
;
int
error
=
-
1
;
int
default_timeout
=
-
1
;
/* Prepare port */
if
(
git__strtol32
(
&
port
,
t
->
connection_data
.
port
,
NULL
,
10
)
<
0
)
...
...
@@ -491,6 +496,9 @@ static int winhttp_connect(
goto
on_error
;
}
WinHttpSetTimeouts
(
t
->
session
,
default_timeout
,
default_timeout
,
default_timeout
,
default_timeout
);
/* Establish connection */
t
->
connection
=
WinHttpConnect
(
t
->
session
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment