mirror of
https://github.com/transmission/transmission
synced 2025-03-08 12:54:40 +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
|
/* if we're mapped, everything is fine... check back at renew_time
|
||||||
* to renew the port forwarding if it's expired */
|
* to renew the port forwarding if it's expired */
|
||||||
s->doPortCheck = true;
|
s->doPortCheck = true;
|
||||||
sec = int(s->natpmp->renew_time - tr_time());
|
sec = std::max(0, int(s->natpmp->renew_time - tr_time()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TR_PORT_ERROR:
|
case TR_PORT_ERROR:
|
||||||
|
|
Loading…
Add table
Reference in a new issue