Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
a4d20515
Commit
a4d20515
authored
Jun 18, 2003
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove file descriptor leak when IPv6 is being used.
svn path=/trunk/net/; revision=4960
parent
49c6946c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
src/net/sock.c
src/net/sock.c
+8
-12
No files found.
src/net/sock.c
View file @
a4d20515
...
...
@@ -503,32 +503,28 @@ sock_t sock_connect_wto(const char *hostname, const int port, const int timeout)
ai
=
head
;
while
(
ai
)
{
if
((
sock
=
socket
(
ai
->
ai_family
,
ai
->
ai_socktype
,
ai
->
ai_protocol
))
>
-
1
)
if
((
sock
=
socket
(
ai
->
ai_family
,
ai
->
ai_socktype
,
ai
->
ai_protocol
))
>
-
1
)
{
if
(
timeout
)
{
sock_set_blocking
(
sock
,
SOCK_NONBLOCK
);
if
(
connect
(
sock
,
ai
->
ai_addr
,
ai
->
ai_addrlen
)
<
0
)
{
int
ret
=
sock_connected
(
sock
,
timeout
);
if
(
ret
<=
0
)
if
(
sock_connected
(
sock
,
timeout
)
>
0
)
{
sock_
close
(
sock
);
sock
=
SOCK_ERROR
;
sock_
set_blocking
(
sock
,
SOCK_BLOCK
);
break
;
}
}
sock_set_blocking
(
sock
,
SOCK_BLOCK
);
}
else
{
if
(
connect
(
sock
,
ai
->
ai_addr
,
ai
->
ai_addrlen
)
<
0
)
{
sock_close
(
sock
);
sock
=
SOCK_ERROR
;
}
if
(
connect
(
sock
,
ai
->
ai_addr
,
ai
->
ai_addrlen
)
==
0
)
break
;
}
sock_close
(
sock
);
}
sock
=
SOCK_ERROR
;
ai
=
ai
->
ai_next
;
}
if
(
head
)
freeaddrinfo
(
head
);
...
...
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