Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
56ff2aa0
Commit
56ff2aa0
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
pick the correct timeout before the connecthost call
parent
9f77771f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/url.c
+7
-8
7 additions, 8 deletions
lib/url.c
with
7 additions
and
8 deletions
lib/url.c
+
7
−
8
View file @
56ff2aa0
...
...
@@ -1118,13 +1118,6 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
{
long
max_time
=
300000
;
/* milliseconds, default to five minutes */
#ifndef ENABLE_IPV6
conn
->
firstsocket
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
#else
/* IPv6-style */
struct
addrinfo
*
ai
;
#endif
#if !defined(WIN32)||defined(__CYGWIN32__)
/* We don't generally like checking for OS-versions, we should make this
HAVE_XXXX based, although at the moment I don't have a decent test for
...
...
@@ -1137,6 +1130,8 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
#endif
#ifndef ENABLE_IPV6
conn
->
firstsocket
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
/*************************************************************
* Select device to bind socket to
*************************************************************/
...
...
@@ -1261,7 +1256,11 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
#endif
/* get the most strict timeout of the ones converted to milliseconds */
max_time
=
min
(
data
->
set
.
timeout
,
data
->
set
.
connecttimeout
)
*
1000
;
if
(
data
->
set
.
timeout
&&
(
data
->
set
.
timeout
>
data
->
set
.
connecttimeout
))
max_time
=
data
->
set
.
timeout
*
1000
;
else
max_time
=
data
->
set
.
connecttimeout
*
1000
;
/* subtract the passed time */
max_time
-=
(
long
)(
has_passed
*
1000
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment