server: Don't complete fb update more than once

If stream_send in finish_fb_update returns -1, then complete_fb_update
will be called there and in the callback to stream_send.
pull/32/merge
Andri Yngvason 2023-11-19 20:27:48 +00:00
parent c76129b2d2
commit d80b51f650
1 changed files with 2 additions and 0 deletions

View File

@ -2002,6 +2002,8 @@ void nvnc_close(struct nvnc* self)
static void complete_fb_update(struct nvnc_client* client)
{
if (!client->is_updating)
return;
client->is_updating = false;
assert(client->current_fb);
nvnc_fb_release(client->current_fb);