winlin

use server ip or name for forward tcurl.

@@ -99,7 +99,11 @@ int SrsForwarder::on_publish(SrsRequest* req, std::string forward_server) @@ -99,7 +99,11 @@ int SrsForwarder::on_publish(SrsRequest* req, std::string forward_server)
99 99
100 // generate tcUrl 100 // generate tcUrl
101 tc_url = "rtmp://"; 101 tc_url = "rtmp://";
  102 + if (vhost == RTMP_VHOST_DEFAULT) {
  103 + tc_url += forward_server;
  104 + } else {
102 tc_url += vhost; 105 tc_url += vhost;
  106 + }
103 tc_url += "/"; 107 tc_url += "/";
104 tc_url += req->app; 108 tc_url += req->app;
105 109