Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-13447
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Feb 29, 2024
1 parent 921267c commit 4cbceb9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
84
85
16 changes: 12 additions & 4 deletions src/AP_WS_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ namespace OpenWifi {
break;
} else if (waits < 5) {
waits++;
std::this_thread::sleep_for(std::chrono::milliseconds(10));
Poco::Thread::trySleep(10);
} else {
break;
}
Expand Down Expand Up @@ -313,7 +313,7 @@ namespace OpenWifi {
SessionMutex_[i].unlock();
break;
} else if (waits < 5) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
Poco::Thread::trySleep(10);
waits++;
} else {
break;
Expand All @@ -336,9 +336,17 @@ namespace OpenWifi {

} else {
NumberOfConnectedDevices_=0;
int wait=0;
for(int i=0;i<MACHash::HashMax();i++) {
std::lock_guard Lock(SerialNumbersMutex_[i]);
NumberOfConnectedDevices_ += SerialNumbers_[i].size();
if(SerialNumbersMutex_[i].try_lock()) {
wait=0;
NumberOfConnectedDevices_ += SerialNumbers_[i].size();
} else if (wait<5) {
++wait;
Poco::Thread::sleep(10);
} else {
continue;
}
}
if(NumberOfConnectedDevices_) {
if (last_garbage_run > 0) {
Expand Down

0 comments on commit 4cbceb9

Please sign in to comment.