Fix version handshake to handle slow data
This commit is contained in:
parent
b8ff5d1bde
commit
c13df5ae67
|
@ -785,8 +785,8 @@ export default class RFB extends EventTargetMixin {
|
||||||
// Message Handlers
|
// Message Handlers
|
||||||
|
|
||||||
_negotiate_protocol_version() {
|
_negotiate_protocol_version() {
|
||||||
if (this._sock.rQlen < 12) {
|
if (this._sock.rQwait("version", 12)) {
|
||||||
return this._fail("Received incomplete protocol version.");
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sversion = this._sock.rQshiftStr(12).substr(4, 7);
|
const sversion = this._sock.rQshiftStr(12).substr(4, 7);
|
||||||
|
|
Loading…
Reference in New Issue