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?


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to