fix #122: edge forwarder(push to origin) assert failed, init client when connect to server. 0.9.167
正在显示
2 个修改的文件
包含
12 行增加
和
3 行删除
| @@ -311,7 +311,7 @@ int SrsEdgeIngester::connect_server() | @@ -311,7 +311,7 @@ int SrsEdgeIngester::connect_server() | ||
| 311 | 311 | ||
| 312 | kbps->set_io(io, io); | 312 | kbps->set_io(io, io); |
| 313 | 313 | ||
| 314 | - srs_trace("edge connected, can_publish=%d, url=%s/%s, server=%s:%d", | 314 | + srs_trace("edge pull connected, can_publish=%d, url=%s/%s, server=%s:%d", |
| 315 | _source->can_publish(), _req->tcUrl.c_str(), _req->stream.c_str(), server.c_str(), port); | 315 | _source->can_publish(), _req->tcUrl.c_str(), _req->stream.c_str(), server.c_str(), port); |
| 316 | 316 | ||
| 317 | return ret; | 317 | return ret; |
| @@ -555,8 +555,17 @@ int SrsEdgeForwarder::connect_server() | @@ -555,8 +555,17 @@ int SrsEdgeForwarder::connect_server() | ||
| 555 | return ret; | 555 | return ret; |
| 556 | } | 556 | } |
| 557 | 557 | ||
| 558 | + srs_freep(client); | ||
| 559 | + srs_freep(io); | ||
| 560 | + | ||
| 561 | + srs_assert(stfd); | ||
| 562 | + io = new SrsSocket(stfd); | ||
| 563 | + client = new SrsRtmpClient(io); | ||
| 564 | + | ||
| 565 | + kbps->set_io(io, io); | ||
| 566 | + | ||
| 558 | // open socket. | 567 | // open socket. |
| 559 | - srs_trace("connect edge stream=%s, tcUrl=%s to server=%s, port=%d", | 568 | + srs_trace("edge push connected, stream=%s, tcUrl=%s to server=%s, port=%d", |
| 560 | _req->stream.c_str(), _req->tcUrl.c_str(), server.c_str(), port); | 569 | _req->stream.c_str(), _req->tcUrl.c_str(), server.c_str(), port); |
| 561 | 570 | ||
| 562 | return ret; | 571 | return ret; |
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
| 33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
| 34 | -#define VERSION_REVISION "166" | 34 | +#define VERSION_REVISION "167" |
| 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
-
请 注册 或 登录 后发表评论