1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine set_recv_timeout in time unit

This commit is contained in:
winlin 2019-04-17 08:31:53 +08:00
parent 38bbf6b111
commit d3dc45f357
20 changed files with 45 additions and 46 deletions

View file

@ -572,7 +572,7 @@ int srs_rtmp_set_timeout(srs_rtmp_t rtmp, int recv_timeout_ms, int send_timeout_
context->stimeout = send_timeout_ms;
context->rtimeout = recv_timeout_ms;
context->skt->set_recv_timeout(context->rtimeout);
context->skt->set_recv_timeout(context->rtimeout * SRS_UTIME_MILLISECONDS);
context->skt->set_send_timeout(context->stimeout * SRS_UTIME_MILLISECONDS);
return ret;
@ -641,7 +641,7 @@ int srs_rtmp_connect_server(srs_rtmp_t rtmp)
}
if (context->rtimeout == SRS_UTIME_NO_TIMEOUT) {
context->rtimeout = SRS_SOCKET_DEFAULT_TMMS;
context->skt->set_recv_timeout(context->rtimeout);
context->skt->set_recv_timeout(context->rtimeout * SRS_UTIME_MILLISECONDS);
}
if ((ret = srs_librtmp_context_connect(context)) != ERROR_SUCCESS) {