1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Don't add clients to the broadcast set until they're authenticated. Note

that actual, real auth is not checked yet.
This commit is contained in:
Simo Kinnunen 2015-09-14 19:38:12 +09:00
parent bff4b7bafe
commit 5cc27a86ad
2 changed files with 6 additions and 3 deletions

View file

@ -110,10 +110,12 @@ module.exports = syrup.serial()
connState.sentFrameTime = connState.lastFrameTime
}
conn.on('authenticated', function() {
screenStream.broadcastSet.insert(id, {
onStart: vncStartListener
, onFrame: vncFrameListener
})
})
conn.on('fbupdaterequest', function() {
connState.updateRequests += 1

View file

@ -253,6 +253,7 @@ VncConnection.prototype._read = function() {
}
debug('client security', this._clientSecurity)
this._writeSecurityResult(VncConnection.SECURITYRESULT_OK)
this.emit('authenticated')
this._changeState(VncConnection.STATE_NEED_CLIENT_INIT)
}
break