mirror of
https://github.com/transmission/transmission
synced 2024-12-24 00:34:04 +00:00
ensure the value passed to tr_timerAdd() is non-negative
This commit is contained in:
parent
fa3cbc3e27
commit
c5bc3091cc
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ static void set_evtimer_from_status(tr_shared* s)
|
|||
/* if we're mapped, everything is fine... check back at renew_time
|
||||
* to renew the port forwarding if it's expired */
|
||||
s->doPortCheck = true;
|
||||
sec = int(s->natpmp->renew_time - tr_time());
|
||||
sec = std::max(0, int(s->natpmp->renew_time - tr_time()));
|
||||
break;
|
||||
|
||||
case TR_PORT_ERROR:
|
||||
|
|
Loading…
Reference in a new issue