We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54ea2af commit 991d74dCopy full SHA for 991d74d
1 file changed
WebSocketAPI.cpp
@@ -315,13 +315,14 @@ namespace Apostol {
315
void CWebSocketAPI::UnloadQueue() {
316
const auto index = m_Queue.IndexOf(this);
317
if (index != -1) {
318
- const auto queue = m_Queue[index];
319
- for (int i = 0; i < queue->Count(); ++i) {
320
- auto pHandler = (CObserverHandler *) queue->Item(i);
321
- if (pHandler != nullptr) {
+ const auto pQueue = m_Queue[index];
+ for (int i = 0; i < pQueue->Count(); ++i) {
+ auto pHandler = (CObserverHandler *) pQueue->Item(i);
+ if (pHandler != nullptr && pHandler->Allow()) {
322
pHandler->Handler();
323
- if (m_Progress >= m_MaxQueue)
+ if (m_Progress >= m_MaxQueue) {
324
break;
325
+ }
326
}
327
328
0 commit comments