File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class WorkerEndpoint extends JSONRPC.EndpointBase
3737
3838 this . _bWorkerStarted = false ;
3939
40- this . _nPersistentWorkerID = null ;
40+ this . _nPersistentWorkerID = undefined ;
4141 }
4242
4343
@@ -81,8 +81,13 @@ class WorkerEndpoint extends JSONRPC.EndpointBase
8181 return this . _masterClient ;
8282 }
8383
84- get persistentWorkerID ( )
84+ async getIfNotPresentPersistentWorkerID ( )
8585 {
86+ if ( this . _nPersistentWorkerID === undefined )
87+ {
88+ this . _nPersistentWorkerID = await this . _masterClient . getPersistentIDForWorkerID ( ) ;
89+ }
90+
8691 return this . _nPersistentWorkerID ;
8792 }
8893
@@ -100,8 +105,6 @@ class WorkerEndpoint extends JSONRPC.EndpointBase
100105 {
101106 throw new Error ( "This mustn't be called through JSONRPC." ) ;
102107 }
103-
104- this . _nPersistentWorkerID = await this . _masterClient . getPersistentIDForWorkerID ( ) ;
105108 }
106109
107110
You can’t perform that action at this time.
0 commit comments