This helps video playback do a slightly better job of keeping up
in the browser. It's not a dramatic effect, but enough to start making
video playback almost tolerable.
Current error message in SPICE-HTML5 error is poor (error-logging function
prints error.toString() which doesn't contain anything detailed).
This patch enhances this message in the following way:
- error event contains target attribute ([1]),
- the code in this patch checks for presence of 'url' attribute (which is
contained in WebSocket object[2]). If the target contains url then
meaningful message is logged.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/Event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
The failure to ack pings led to a nasty bug whereby an inactive client hangs.
The relatively recent change to monitor latency with ping exposed this bug.