mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
Also delay the port check if port forwarding was just disabled
This commit is contained in:
parent
d4baaede82
commit
f37f992086
1 changed files with 5 additions and 2 deletions
|
@ -344,8 +344,10 @@ tr_handle * fHandle;
|
|||
{
|
||||
const tr_port_forwarding fwd = tr_sessionGetPortForwarding(fHandle);
|
||||
const int port = tr_sessionGetPeerPort(fHandle);
|
||||
BOOL natStatusChanged = (fNatStatus != fwd);
|
||||
BOOL peerPortChanged = (fPeerPort != port);
|
||||
|
||||
if (fNatStatus != fwd || fPeerPort != port )
|
||||
if (natStatusChanged || peerPortChanged)
|
||||
{
|
||||
fNatStatus = fwd;
|
||||
fPeerPort = port;
|
||||
|
@ -359,7 +361,8 @@ tr_handle * fHandle;
|
|||
[fPortChecker cancelProbe];
|
||||
[fPortChecker release];
|
||||
}
|
||||
fPortChecker = [[PortChecker alloc] initForPort: fPeerPort delay: tr_sessionIsPortForwardingEnabled(fHandle) withDelegate: self];
|
||||
BOOL delay = natStatusChanged || tr_sessionIsPortForwardingEnabled(fHandle);
|
||||
fPortChecker = [[PortChecker alloc] initForPort: fPeerPort delay: delay withDelegate: self];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue