File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
// :copyright: Copyright (c) 2016 ftrack
2
2
import { v4 as uuidV4 } from "uuid" ;
3
3
import loglevel from "loglevel" ;
4
- import io from "./simple_socketio.js" ;
5
4
import { Event } from "./event.js" ;
6
5
import {
7
6
EventServerConnectionTimeoutError ,
@@ -10,7 +9,7 @@ import {
10
9
NotUniqueError ,
11
10
} from "./error.js" ;
12
11
import { Data } from "./types.js" ;
13
-
12
+ import type io from "./simple_socketio.js" ;
14
13
interface BaseActionData {
15
14
selection : Array < {
16
15
entityId : string ;
@@ -178,7 +177,9 @@ export class EventHub {
178
177
}
179
178
180
179
/** Connect to the event server. */
181
- connect ( ) : void {
180
+ async connect ( ) : Promise < void > {
181
+ const simple_socketio = await import ( "./simple_socketio.js" ) ;
182
+ const io = simple_socketio . default ;
182
183
this . _socketIo = io . connect ( this . _serverUrl , this . _apiUser , this . _apiKey ) ;
183
184
this . _socketIo . on ( "connect" , this . _onSocketConnected ) ;
184
185
this . _socketIo . on ( "ftrack.event" , this . _handle ) ;
You can’t perform that action at this time.
0 commit comments