zhengfl

fix #437

edge模式,重新从源站拉流时,导致forwarders异常
... ... @@ -94,6 +94,13 @@ int SrsEdgeIngester::initialize(SrsSource* source, SrsPlayEdge* edge, SrsRequest
int SrsEdgeIngester::start()
{
int ret = ERROR_SUCCESS;
if ((ret = _source->on_publish()) != ERROR_SUCCESS) {
srs_error("edge pull stream then publish to edge failed. ret=%d", ret);
return ret;
}
return pthread->start();
}
... ... @@ -114,6 +121,7 @@ void SrsEdgeIngester::stop()
int SrsEdgeIngester::cycle()
{
int ret = ERROR_SUCCESS;
_source->on_source_id_changed(_srs_context->get_id());
std::string ep_server, ep_port;
if ((ret = connect_server(ep_server, ep_port)) != ERROR_SUCCESS) {
... ... @@ -144,11 +152,6 @@ int SrsEdgeIngester::cycle()
return ret;
}
if ((ret = _source->on_publish()) != ERROR_SUCCESS) {
srs_error("edge pull stream then publish to edge failed. ret=%d", ret);
return ret;
}
if ((ret = _edge->on_ingest_play()) != ERROR_SUCCESS) {
return ret;
}
... ...