Skip to content

Commit

Permalink
Add null check for transport. (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonxia163 authored and jcague committed Jan 22, 2020
1 parent fb367b8 commit 264fcc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions erizo/src/erizo/DtlsTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ void TimeoutChecker::scheduleCheck() {

void TimeoutChecker::scheduleNext() {
scheduled_task_ = transport_->getWorker()->scheduleFromNow([this]() {
if (transport_->getTransportState() == TRANSPORT_READY) {
return;
}
if (transport_ != nullptr) {
if (transport_->getTransportState() == TRANSPORT_READY) {
return;
}
if (max_checks_-- > 0) {
ELOG_DEBUG("Handling dtls timeout, checks left: %d", max_checks_);
if (socket_context_) {
Expand Down

0 comments on commit 264fcc3

Please sign in to comment.