release the turn allocation by sending a refresh request with lifetime 0

BUG=406578

Patch originally from philipp.hancke@googlemail.com

R=juberti@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41449004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8087 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pthatcher@webrtc.org
2015-01-17 00:58:15 +00:00
parent d7de1209ae
commit fe672e3839
3 changed files with 59 additions and 2 deletions

View File

@ -44,7 +44,11 @@ void StunRequestManager::SendDelayed(StunRequest* request, int delay) {
request->set_origin(origin_);
request->Construct();
requests_[request->id()] = request;
thread_->PostDelayed(delay, request, MSG_STUN_SEND, NULL);
if (delay > 0) {
thread_->PostDelayed(delay, request, MSG_STUN_SEND, NULL);
} else {
thread_->Send(request, MSG_STUN_SEND, NULL);
}
}
void StunRequestManager::Remove(StunRequest* request) {