Shared memory logic fix for quick disconnecting users
This commit is contained in:
parent
94f83a1775
commit
0a1b00cb5e
1 changed files with 10 additions and 6 deletions
|
@ -1001,8 +1001,10 @@ namespace IPC {
|
||||||
amount = lastFilled+1;
|
amount = lastFilled+1;
|
||||||
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
||||||
}
|
}
|
||||||
//stop, we're guaranteed no more pages are full at this point
|
if (id >= amount + 100) {
|
||||||
break;
|
//stop, we're guaranteed no more pages are full at this point
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1023,11 +1025,13 @@ namespace IPC {
|
||||||
amount = lastFilled+1;
|
amount = lastFilled+1;
|
||||||
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
VERYHIGH_MSG("Shared memory %s is now at count %u", baseName.c_str(), amount);
|
||||||
}
|
}
|
||||||
//stop, we're guaranteed no more pages are full at this point
|
if (id >= amount + 100) {
|
||||||
if (empty) {
|
//stop, we're guaranteed no more pages are full at this point
|
||||||
free(empty);
|
if (empty) {
|
||||||
|
free(empty);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue