server: Close client if no frame encoding method is available

pull/13/head
Andri Yngvason 2020-01-19 21:27:17 +00:00
parent ebfe4382ee
commit 7fa074e60b
1 changed files with 5 additions and 1 deletions

View File

@ -688,7 +688,11 @@ void do_client_update_fb(uv_work_t* work)
const struct nvnc_fb* fb = update->fb; const struct nvnc_fb* fb = update->fb;
enum rfb_encodings encoding = choose_frame_encoding(client); enum rfb_encodings encoding = choose_frame_encoding(client);
assert(encoding != -1); if (encoding == -1) {
uv_read_stop((uv_stream_t*)&client->stream_handle);
client_unref(client);
return;
}
switch (encoding) { switch (encoding) {
case RFB_ENCODING_RAW: case RFB_ENCODING_RAW: