mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine SrsTcpClient timeout in time unit
This commit is contained in:
parent
e9770933a6
commit
61afca7160
10 changed files with 46 additions and 23 deletions
|
@ -220,7 +220,7 @@ srs_error_t SrsHttpClient::connect()
|
|||
return err;
|
||||
}
|
||||
|
||||
transport = new SrsTcpClient(host, port, timeout);
|
||||
transport = new SrsTcpClient(host, port, srs_utime_t(timeout * SRS_UTIME_MILLISECONDS));
|
||||
if ((err = transport->connect()) != srs_success) {
|
||||
disconnect();
|
||||
return srs_error_wrap(err, "http: tcp connect %s:%d to=%d", host.c_str(), port, (int)timeout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue