Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
f2e1bc24
Commit
f2e1bc24
authored
Jun 20, 2003
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle error returned from listening sockets, can cause busy looping
svn path=/trunk/icecast/; revision=4986
parent
784fe52e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
src/connection.c
src/connection.c
+22
-2
No files found.
src/connection.c
View file @
f2e1bc24
...
...
@@ -145,11 +145,31 @@ static int wait_for_serversock(int timeout)
return
-
1
;
}
else
{
int
dst
;
for
(
i
=
0
;
i
<
global
.
server_sockets
;
i
++
)
{
if
(
ufds
[
i
].
revents
==
POLLIN
)
if
(
ufds
[
i
].
revents
&
POLLIN
)
return
ufds
[
i
].
fd
;
if
(
ufds
[
i
].
revents
&
(
POLLHUP
|
POLLERR
|
POLLNVAL
))
{
if
(
ufds
[
i
].
revents
&
(
POLLHUP
|
POLLERR
))
{
close
(
global
.
serversock
[
i
]);
WARN0
(
"Had to close a listening socket"
);
}
global
.
serversock
[
i
]
=
-
1
;
}
}
/* remove any closed sockets */
for
(
i
=
0
,
dst
=
0
;
i
<
global
.
server_sockets
;
i
++
)
{
if
(
global
.
serversock
[
i
]
==
-
1
)
continue
;
if
(
i
!=
dst
)
global
.
serversock
[
dst
]
=
global
.
serversock
[
i
];
dst
++
;
}
return
-
1
;
/* Shouldn't happen */
global
.
server_sockets
=
dst
;
return
-
1
;
}
#else
fd_set
rfds
;
...
...
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