]> git.proxmox.com Git - mirror_qemu.git/commit
io: fix decoding when multiple websockets frames arrive at once
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 27 Jan 2017 18:11:32 +0000 (18:11 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 28 Feb 2017 10:36:31 +0000 (10:36 +0000)
commitcd892a2efc47bf45d058578fb557ba6db235a3a8
tree7a9a36c49ce6406b09f2bdcaf57ab44c6204bc59
parent8f2d7c341184a95d05476ea3c45dbae2b9ddbe51
io: fix decoding when multiple websockets frames arrive at once

The qio_channel_websock_read_wire() method will read upto 4096
bytes off the socket and then decode the websockets header and
payload. The code was only decoding a single websockets frame,
even if the buffered data contained multiple frames. This meant
that decoding of subsequent frames was delayed until further
input arrived on the socket. This backlog of delayed frames
gets worse & worse over time.

Symptom was that when connecting to the VNC server via the
built-in websockets server, mouse/keyboard interaction would
start out fine, but slowly get more & more delayed until it
was unusable.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
io/channel-websock.c