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

For #913, http callback use complex error

This commit is contained in:
winlin 2017-09-22 19:54:50 +08:00
parent 59b53dab8b
commit 20a42599f3
22 changed files with 264 additions and 268 deletions

View file

@ -60,6 +60,7 @@ SrsBasicRtmpClient::~SrsBasicRtmpClient()
int SrsBasicRtmpClient::connect()
{
int ret = ERROR_SUCCESS;
srs_error_t err = srs_success;
close();
@ -67,8 +68,11 @@ int SrsBasicRtmpClient::connect()
client = new SrsRtmpClient(transport);
kbps->set_io(transport, transport);
if ((ret = transport->connect()) != ERROR_SUCCESS) {
if ((err = transport->connect()) != srs_success) {
close();
// TODO: FIXME: Use error
ret = srs_error_code(err);
srs_freep(err);
return ret;
}