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
54205507
Commit
54205507
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
If Curl_do() fails with CURLE_WRITE_ERROR on a re-used connection, this
new logic can retry the same operation on a new connection!
parent
7b93348a
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/transfer.c
+22
-0
22 additions, 0 deletions
lib/transfer.c
with
22 additions
and
0 deletions
lib/transfer.c
+
22
−
0
View file @
54205507
...
@@ -922,6 +922,28 @@ CURLcode Curl_perform(struct SessionHandle *data)
...
@@ -922,6 +922,28 @@ CURLcode Curl_perform(struct SessionHandle *data)
res
=
Curl_connect
(
data
,
&
conn
,
port
);
res
=
Curl_connect
(
data
,
&
conn
,
port
);
if
(
res
==
CURLE_OK
)
{
if
(
res
==
CURLE_OK
)
{
res
=
Curl_do
(
conn
);
res
=
Curl_do
(
conn
);
if
((
CURLE_WRITE_ERROR
==
res
)
&&
conn
->
bits
.
reuse
)
{
/* This was a re-use of a connection and we got a write error in the
* DO-phase. Then we DISCONNECT this connection and have another
* attempt to CONNECT and then DO again! The retry cannot possibly
* find another connection to re-use, since we only keep one possible
* connection for each.
*/
infof
(
data
,
"The re-used connection seems dead, get a new one
\n
"
);
conn
->
bits
.
close
=
TRUE
;
/* enforce close of this connetion */
res
=
Curl_done
(
conn
);
/* we are so done with this */
if
(
CURLE_OK
==
res
)
{
/* Now, redo the connect */
res
=
Curl_connect
(
data
,
&
conn
,
port
);
if
(
CURLE_OK
==
res
)
/* ... finally back to actually retry the DO phase */
res
=
Curl_do
(
conn
);
}
}
if
(
res
==
CURLE_OK
)
{
if
(
res
==
CURLE_OK
)
{
CURLcode
res2
;
/* just a local extra result container */
CURLcode
res2
;
/* just a local extra result container */
...
...
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