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

refine the order.

This commit is contained in:
winlin 2015-09-17 13:36:02 +08:00
parent 7b2b11e932
commit 1fd83d9314
30 changed files with 985 additions and 751 deletions

View file

@ -44,6 +44,7 @@ SrsHttpClient::SrsHttpClient()
skt = NULL;
parser = NULL;
timeout_us = 0;
port = 0;
}
SrsHttpClient::~SrsHttpClient()
@ -56,6 +57,11 @@ int SrsHttpClient::initialize(string h, int p, int64_t t_us)
{
int ret = ERROR_SUCCESS;
// disconnect first when h:p changed.
if ((!host.empty() && host != h) || (port != 0 && port != p)) {
disconnect();
}
srs_freep(parser);
parser = new SrsHttpParser();