Changeset 642b8dc5bdbc79c6d444feb0d77e58cb8dd69669
- Timestamp:
- 24/11/07 17:27:12
(11 months ago)
- Author:
- Dennis van Amerongen <trax@videolan.org>
- git-committer:
- Dennis van Amerongen <trax@videolan.org> 1195921632 +0000
- git-parent:
[73424dcfb59e2698b793bb71b62a736e85511357]
- git-author:
- Dennis van Amerongen <trax@videolan.org> 1195921632 +0000
- Message:
* modules/access_output/shout.c: Implement automatic reconnection on server disconnect - closes #1167
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re40d134 |
r642b8dc |
|
| 476 | 476 | { |
|---|
| 477 | 477 | size_t i_write = 0; |
|---|
| | 478 | long i_ret; |
|---|
| 478 | 479 | |
|---|
| 479 | 480 | shout_sync( p_access->p_sys->p_shout ); |
|---|
| … | … | |
| 492 | 493 | msg_Err( p_access, "cannot write to stream: %s", |
|---|
| 493 | 494 | shout_get_error(p_access->p_sys->p_shout) ); |
|---|
| | 495 | |
|---|
| | 496 | /* This can be caused by a server disconnect. Reconnecting might help... */ |
|---|
| | 497 | shout_close( p_access->p_sys->p_shout ); |
|---|
| | 498 | msg_Warn( p_access, "server unavailable? waiting 30 seconds to reconnect..." ); |
|---|
| | 499 | msleep( 30000000 ); |
|---|
| | 500 | if( shout_open( p_access->p_sys->p_shout ) == SHOUTERR_SUCCESS ) |
|---|
| | 501 | { |
|---|
| | 502 | msg_Warn( p_access, "reconnected to server" ); |
|---|
| | 503 | } |
|---|
| | 504 | else |
|---|
| | 505 | { |
|---|
| | 506 | msg_Err( p_access, "failed to reconnect to server" ); |
|---|
| | 507 | } |
|---|
| | 508 | |
|---|
| 494 | 509 | } |
|---|
| 495 | 510 | block_Release( p_buffer ); |
|---|