mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
Gui::Connection::buffer: fix upgrade loop
Once set to true, the 'retry' flag would never be reset to false. Issue #5242
This commit is contained in:
parent
bfce470690
commit
d29cb0a15d
@ -164,13 +164,12 @@ class Gui::Connection : private Genode::Connection<Session>
|
||||
_ram_quota.value += upgrade;
|
||||
}
|
||||
|
||||
for (bool retry = false; ; ) {
|
||||
for (;;) {
|
||||
using Result = Session_client::Buffer_result;
|
||||
auto const result = _client.buffer(mode);
|
||||
if (result == Result::OUT_OF_RAM) { upgrade_ram(8*1024); retry = true; }
|
||||
if (result == Result::OUT_OF_CAPS) { upgrade_caps(2); retry = true; }
|
||||
if (!retry)
|
||||
break;
|
||||
if (result == Result::OUT_OF_RAM) { upgrade_ram(8*1024); continue; }
|
||||
if (result == Result::OUT_OF_CAPS) { upgrade_caps(2); continue; }
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user