Fix pending connections for websocket browser connections

Summary:
Connections from VSCode and Kite would remain forever pending because they don't go through the secure connection handler. This diff fixes that. Also removed the separate event that existed for that, since registering a new client is already a 'success' signal, so it doesn't need a separate event.

It turned out that the VSCode pending connection is actually correct, as it never handles the `getPlugins` event, so apparently the handling is broken. Added timeouts to guard against that as well.

Applied several code simplications as well.

Introduced an explicit cert exchange medium 'NONE' so that in code it is a bit clearer where CSR negotiation is supposed to happen.

Changelog: Fixed an issue where Kite / Unity apps didn't connect anymore

Reviewed By: timur-valiev

Differential Revision: D30866301

fbshipit-source-id: 8bd214fd9eebcd9a7583f1b44ee283883002f62e
This commit is contained in:
Michel Weststrate
2021-09-10 07:01:41 -07:00
committed by Facebook GitHub Bot
parent d8f77db632
commit 80f48b444c
11 changed files with 56 additions and 75 deletions

View File

@@ -70,7 +70,7 @@ export default async (store: Store, logger: Logger) => {
server.on('device-connected', (device) => {
logger.track('usage', 'register-device', {
os: 'Android',
os: device.os,
name: device.title,
serial: device.serial,
});