Fixed deadlock on sharedClient during shutdown
This commit is contained in:
parent
b3cdf34fbc
commit
9f9c67b07e
1 changed files with 25 additions and 22 deletions
|
@ -1141,8 +1141,8 @@ namespace IPC {
|
|||
}
|
||||
memset(empty, 0, payLen);
|
||||
}
|
||||
while (offsetOnPage == -1) {
|
||||
{
|
||||
uint32_t attempts = 0;
|
||||
while (offsetOnPage == -1 && (++attempts) < 20) {
|
||||
for (char i = 'A'; i <= 'Z'; i++) {
|
||||
myPage.init(baseName.substr(1) + i, (4096 << (i - 'A')), false, false);
|
||||
if (!myPage.mapped) {
|
||||
|
@ -1168,11 +1168,14 @@ namespace IPC {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (offsetOnPage == -1) {
|
||||
Util::wait(500);
|
||||
}
|
||||
}
|
||||
if (offsetOnPage == -1){
|
||||
FAIL_MSG("Could not register on page for %s", baseName.c_str());
|
||||
myPage.close();
|
||||
}
|
||||
if (empty) {
|
||||
free(empty);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue