mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复webrtcsession getIdentifier 为空的bug,导致GetAllSession webrtcsession的id 为空
This commit is contained in:
parent
4f47b7a5fe
commit
96c19ac85f
@ -58,7 +58,6 @@ void WebRtcSession::onRecv(const Buffer::Ptr &buffer) {
|
||||
//只允许寻找一次transport
|
||||
_find_transport = false;
|
||||
auto user_name = getUserName(buffer);
|
||||
_identifier = to_string(getSock()->rawFD()) + '-' + user_name;
|
||||
auto transport = WebRtcTransportManager::Instance().getItem(user_name);
|
||||
CHECK(transport && transport->getPoller()->isCurrentThread());
|
||||
transport->setSession(shared_from_this());
|
||||
@ -97,7 +96,5 @@ void WebRtcSession::onManager() {
|
||||
}
|
||||
}
|
||||
|
||||
std::string WebRtcSession::getIdentifier() const {
|
||||
return _identifier;
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,12 +24,11 @@ public:
|
||||
void onRecv(const Buffer::Ptr &) override;
|
||||
void onError(const SockException &err) override;
|
||||
void onManager() override;
|
||||
std::string getIdentifier() const override;
|
||||
//std::string getIdentifier() const override;
|
||||
|
||||
static EventPoller::Ptr queryPoller(const Buffer::Ptr &buffer);
|
||||
|
||||
private:
|
||||
std::string _identifier;
|
||||
bool _find_transport = true;
|
||||
Ticker _ticker;
|
||||
struct sockaddr_storage _peer_addr;
|
||||
|
Loading…
Reference in New Issue
Block a user