File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ export class Appservice extends EventEmitter {
236
236
private appServer : any ;
237
237
private intentsCache : LRU . LRUCache < string , Intent > ;
238
238
private eventProcessors : { [ eventType : string ] : IPreprocessor [ ] } = { } ;
239
- private pendingTransactions : { [ txnId : string ] : Promise < any > } = { } ;
239
+ private pendingTransactions : { [ txnId : string ] : Promise < void > } = { } ;
240
240
241
241
/**
242
242
* Creates a new application service.
@@ -695,8 +695,7 @@ export class Appservice extends EventEmitter {
695
695
}
696
696
697
697
LogService . info ( "Appservice" , "Processing transaction " + txnId ) ;
698
- // eslint-disable-next-line no-async-promise-executor
699
- this . pendingTransactions [ txnId ] = new Promise < void > ( async ( resolve ) => {
698
+ this . pendingTransactions [ txnId ] = Promise . resolve ( ( async ( ) => {
700
699
// Process all the crypto stuff first to ensure that future transactions (if not this one)
701
700
// will decrypt successfully. We start with EDUs because we need structures to put counts
702
701
// and such into in a later stage, and EDUs are independent of crypto.
@@ -891,9 +890,7 @@ export class Appservice extends EventEmitter {
891
890
this . emit ( "room.upgraded" , event [ 'room_id' ] , event ) ;
892
891
}
893
892
}
894
-
895
- resolve ( ) ;
896
- } ) ;
893
+ } ) ( ) ) ;
897
894
898
895
try {
899
896
await this . pendingTransactions [ txnId ] ;
You can’t perform that action at this time.
0 commit comments