mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the timeout for librtmp
This commit is contained in:
parent
3fbe9d2442
commit
e00928557e
4 changed files with 86 additions and 14 deletions
|
@ -88,7 +88,15 @@ int main(int argc, char** argv)
|
|||
exit(-2);
|
||||
}
|
||||
|
||||
rtmp = srs_rtmp_create(rtmp_url);
|
||||
if ((rtmp = srs_rtmp_create(rtmp_url)) == NULL) {
|
||||
srs_human_trace("create rtmp failed");
|
||||
ret = -1;
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
if ((ret = srs_rtmp_set_timeout(rtmp, timeout * 1000, timeout * 1000)) != 0) {
|
||||
srs_human_trace("set timeout for rtmp failed. errno=%d", ret);
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
|
||||
if ((ret = srs_rtmp_dns_resolve(rtmp)) != 0) {
|
||||
srs_human_trace("dns resolve failed. ret=%d", ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue