winlin

merge from srs2 #558 #559

@@ -144,6 +144,7 @@ int SrsHttpHooks::on_publish(string url, SrsRequest* req) @@ -144,6 +144,7 @@ int SrsHttpHooks::on_publish(string url, SrsRequest* req)
144 obj->set("ip", SrsJsonAny::str(req->ip.c_str())); 144 obj->set("ip", SrsJsonAny::str(req->ip.c_str()));
145 obj->set("vhost", SrsJsonAny::str(req->vhost.c_str())); 145 obj->set("vhost", SrsJsonAny::str(req->vhost.c_str()));
146 obj->set("app", SrsJsonAny::str(req->app.c_str())); 146 obj->set("app", SrsJsonAny::str(req->app.c_str()));
  147 + obj->set("tcUrl", SrsJsonAny::str(req->tcUrl.c_str()));
147 obj->set("stream", SrsJsonAny::str(req->stream.c_str())); 148 obj->set("stream", SrsJsonAny::str(req->stream.c_str()));
148 149
149 std::string data = obj->dumps(); 150 std::string data = obj->dumps();
@@ -237,11 +237,6 @@ namespace internal @@ -237,11 +237,6 @@ namespace internal
237 // readly terminated now. 237 // readly terminated now.
238 really_terminated = true; 238 really_terminated = true;
239 239
240 - // when thread terminated normally, also disposed.  
241 - // we must set to disposed before the on_thread_stop, which may free the thread.  
242 - // @see https://github.com/ossrs/srs/issues/546  
243 - disposed = true;  
244 -  
245 handler->on_thread_stop(); 240 handler->on_thread_stop();
246 srs_info("thread %s cycle finished", _name); 241 srs_info("thread %s cycle finished", _name);
247 } 242 }