Commit 3234ed6 1 parent 2f0cf44 commit 3234ed6 Copy full SHA for 3234ed6
File tree 1 file changed +15
-17
lines changed
src/class/eventManagement
1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -263,30 +263,28 @@ export class Dispatcher<T extends GenericEvent = GenericEvent> extends EventEmit
263
263
}
264
264
} ) ;
265
265
266
- this . resolveTransactionsInterval = setInterval ( async ( ) => {
266
+ this . resolveTransactionsInterval = setInterval ( ( ) => {
267
267
if ( ! this . isWorking ) {
268
268
return ;
269
269
}
270
270
271
- try {
272
- await this . transactionHandler . resolveTransactions ( ) ;
273
- }
274
- catch ( error ) {
275
- this . logger . error ( { error : error . stack } , "Failed at resolving transactions" ) ;
276
- }
271
+ new Promise ( ( resolve ) => {
272
+ this . transactionHandler . resolveTransactions ( )
273
+ . then ( ( ) => resolve ( null ) )
274
+ . catch ( ( error ) => this . logger . error ( { error : error . stack } , "Failed at resolving transactions" ) ) ;
275
+ } ) ;
277
276
} , options . checkTransactionInterval ?? RESOLVE_TRANSACTION_INTERVAL ) . unref ( ) ;
278
277
279
- this . pingIntervalTimer = setInterval ( async ( ) => {
280
- try {
281
- if ( ! this . isWorking ) {
282
- return ;
283
- }
284
-
285
- await this . ping ( ) ;
286
- }
287
- catch ( error ) {
288
- this . logger . error ( { error : error . stack } , "Failed sending pings" ) ;
278
+ this . pingIntervalTimer = setInterval ( ( ) => {
279
+ if ( ! this . isWorking ) {
280
+ return ;
289
281
}
282
+
283
+ new Promise ( ( resolve ) => {
284
+ this . ping ( )
285
+ . then ( ( ) => resolve ( null ) )
286
+ . catch ( ( error ) => this . logger . error ( { error : error . stack } , "Failed sending pings" ) ) ;
287
+ } ) ;
290
288
} , this . pingInterval ) . unref ( ) ;
291
289
292
290
this . checkLastActivityIntervalTimer = setInterval ( async ( ) => {
You can’t perform that action at this time.
0 commit comments