(port, eventCache)
| 55 | |
| 56 | class ControllerTransaction { |
| 57 | async addPort(port, eventCache) { |
| 58 | const sender = parseViewName(port.name); |
| 59 | const subContr = await controllerPool.get(sender.id); |
| 60 | if (subContr) { |
| 61 | verifyConnectPermission(subContr.mainType, sender); |
| 62 | subContr.addPort(port, eventCache); |
| 63 | } else { |
| 64 | try { |
| 65 | await createController(sender.type, port, eventCache); |
| 66 | } catch (e) { |
| 67 | console.error(e); |
| 68 | port.postMessage({event: 'terminate'}); |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | const addPortQueue = new PromiseQueue(); |
nothing calls this directly
no test coverage detected