[pve-devel] [PATCH] fix #6223: fit terminal after 'OK' message
Dominik Csapak
d.csapak at proxmox.com
Wed Mar 26 09:11:42 CET 2025
On 3/25/25 19:44, Thomas Lamprecht wrote:
> Am 18.03.25 um 10:09 schrieb Dominik Csapak:
>> instead of simply waiting 250ms after we send the credentials, wait
>> until after the server responded with 'OK' to fit the terminal size.
>> Still keep the timeout to not do that in the onmessage handler itself,
>> but rather at a later point in time.
>
> potential dumb question, but what's the reason to keep the 250ms in
> that case?
not a dumb question at all, and you're right: the exact value of 250ms is strictly not necessary.
I wanted to keep the code in a timeout, so it does not block the 'onmessage' handler,
but rather that it runs later when the browser has idle cycles.
We could of course reduce the timeout, but in my experience, sometimes browsers behave unexpected
when it's too short (e.g., it then runs immediatly after the JS code, without a render cycle in
between, which is what i want to avoid here)
In practice, omitting the timeout here would naturally work too here, but possibly delay the content
of the terminal in favor of resizing.
Does that make sense to you?
More information about the pve-devel
mailing list