net: avoid unnecessary copy in checkAndReThread()

Change-Id: I7a31ded80de128c46f59db3f0cba497de2f9f96c
This commit is contained in:
Miklos Vajna
2019-06-12 08:58:22 +02:00
parent 07b6d7ee5e
commit 58d9b0ebbf

View File

@ -483,7 +483,7 @@ public:
return; // all well
LOG_DBG("Ununusual - SocketPoll used from a new thread");
_owner = us;
for (auto it : _pollSockets)
for (const auto& it : _pollSockets)
it->setThreadOwner(us);
// _newSockets are adapted as they are inserted.
}