mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-19 00:16:52 +00:00
Eliminate redundant SharedPtr assignment.
This commit is contained in:
parent
6eb9289367
commit
a95f1e1418
@ -771,13 +771,10 @@ bool Switch::_trySend(const Packet &packet,bool encrypt)
|
||||
if (peer) {
|
||||
const uint64_t now = RR->node->now();
|
||||
|
||||
SharedPtr<Peer> via;
|
||||
Path *viaPath;
|
||||
if ((viaPath = peer->getBestPath(now))) {
|
||||
via = peer;
|
||||
} else {
|
||||
via = RR->topology->getBestSupernode();
|
||||
if (!(via)||(!(viaPath = via->getBestPath(now))))
|
||||
Path *viaPath = peer->getBestPath(now);
|
||||
if (!viaPath) {
|
||||
SharedPtr<Peer> sn(RR->topology->getBestSupernode());
|
||||
if (!(sn)||(!(viaPath = sn->getBestPath(now))))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user