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
e0054eb3
Commit
e0054eb3
authored
Oct 03, 2002
by
Michael Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for possible obscure bug leading to source disconnects.
svn path=/trunk/icecast/; revision=3975
parent
ed94b193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/source.c
src/source.c
+7
-1
No files found.
src/source.c
View file @
e0054eb3
...
...
@@ -148,6 +148,7 @@ void *source_main(void *arg)
stats_event
(
source
->
mount
,
"type"
,
source
->
format
->
format_description
);
while
(
global
.
running
==
ICE_RUNNING
)
{
bytes
=
0
;
ret
=
source
->
format
->
get_buffer
(
source
->
format
,
NULL
,
0
,
&
refbuf
);
if
(
ret
<
0
)
{
WARN0
(
"Bad data from source"
);
...
...
@@ -159,13 +160,18 @@ void *source_main(void *arg)
ret
=
util_timed_wait_for_fd
(
source
->
con
->
sock
,
timeout
*
1000
);
if
(
ret
<=
0
)
{
/* timeout expired */
WARN1
(
"Disconnecting source: socket timeout (%d s) expired"
,
timeout
);
bytes
=
0
;
break
;
}
bytes
=
sock_read_bytes
(
source
->
con
->
sock
,
buffer
,
4096
);
if
(
bytes
==
0
||
(
bytes
<
0
&&
!
sock_recoverable
(
sock_error
())))
if
(
bytes
==
0
||
(
bytes
<
0
&&
!
sock_recoverable
(
sock_error
())))
{
DEBUG1
(
"Disconnecting source due to socket read error: %s"
,
strerror
(
sock_error
()));
break
;
}
}
if
(
bytes
<=
0
)
break
;
source
->
client
->
con
->
sent_bytes
+=
bytes
;
...
...
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