mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #441, use 30s timeout for first msg. 2.0.178
This commit is contained in:
parent
5f77724021
commit
366d3a3f56
4 changed files with 12 additions and 3 deletions
|
@ -344,6 +344,7 @@ Remark:
|
||||||
|
|
||||||
### SRS 2.0 history
|
### SRS 2.0 history
|
||||||
|
|
||||||
|
* v2.0, 2015-07-16, for [#441](https://github.com/simple-rtmp-server/srs/issues/441) use 30s timeout for first msg. 2.0.178
|
||||||
* v2.0, 2015-07-14, refine hls disable the time jitter, support not mix monotonically increase. 2.0.177
|
* v2.0, 2015-07-14, refine hls disable the time jitter, support not mix monotonically increase. 2.0.177
|
||||||
* v2.0, 2015-07-01, fix [#433](https://github.com/simple-rtmp-server/srs/issues/433) fix the sps parse bug. 2.0.176
|
* v2.0, 2015-07-01, fix [#433](https://github.com/simple-rtmp-server/srs/issues/433) fix the sps parse bug. 2.0.176
|
||||||
* v2.0, 2015-06-10, fix [#425](https://github.com/simple-rtmp-server/srs/issues/425) refine the time jitter, correct (-inf,-250)+(250,+inf) to 10ms. 2.0.175
|
* v2.0, 2015-06-10, fix [#425](https://github.com/simple-rtmp-server/srs/issues/425) refine the time jitter, correct (-inf,-250)+(250,+inf) to 10ms. 2.0.175
|
||||||
|
|
|
@ -782,8 +782,14 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
|
||||||
while (!disposed) {
|
while (!disposed) {
|
||||||
pprint->elapse();
|
pprint->elapse();
|
||||||
|
|
||||||
// cond wait for error.
|
// cond wait for timeout.
|
||||||
trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000);
|
if (nb_msgs == 0) {
|
||||||
|
// when not got msgs, wait for a larger timeout.
|
||||||
|
// @see https://github.com/simple-rtmp-server/srs/issues/441
|
||||||
|
trd->wait(SRS_CONSTS_RTMP_PUBLISHER_NO_MSG_RECV_TIMEOUT_US / 1000);
|
||||||
|
} else {
|
||||||
|
trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
// check the thread error code.
|
// check the thread error code.
|
||||||
if ((ret = trd->error_code()) != ERROR_SUCCESS) {
|
if ((ret = trd->error_code()) != ERROR_SUCCESS) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// current release version
|
// current release version
|
||||||
#define VERSION_MAJOR 2
|
#define VERSION_MAJOR 2
|
||||||
#define VERSION_MINOR 0
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 177
|
#define VERSION_REVISION 178
|
||||||
|
|
||||||
// server info.
|
// server info.
|
||||||
#define RTMP_SIG_SRS_KEY "SRS"
|
#define RTMP_SIG_SRS_KEY "SRS"
|
||||||
|
|
|
@ -78,6 +78,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// we must use more smaller timeout, for the recv never know the status
|
// we must use more smaller timeout, for the recv never know the status
|
||||||
// of underlayer socket.
|
// of underlayer socket.
|
||||||
#define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL)
|
#define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL)
|
||||||
|
// when no msg recevied for publisher, use larger timeout.
|
||||||
|
#define SRS_CONSTS_RTMP_PUBLISHER_NO_MSG_RECV_TIMEOUT_US 10*SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US
|
||||||
|
|
||||||
// the timeout to wait for client control message,
|
// the timeout to wait for client control message,
|
||||||
// if timeout, we generally ignore and send the data to client,
|
// if timeout, we generally ignore and send the data to client,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue