File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export class ClusterMemoryStoreWorker implements Store {
89
89
}
90
90
91
91
cluster . worker . on ( 'message' , this . onMessage . bind ( this ) )
92
- return this . send ( 'init' , [ { windowMs : this . windowMs } ] ) . catch (
92
+ return this . send ( 'init' , [ { windowMs : this . windowMs } ] , 10 * 1000 ) . catch (
93
93
( error : any ) => {
94
94
console . error ( `${ errorPrefix } failed to initialize` , error )
95
95
} ,
@@ -131,11 +131,14 @@ export class ClusterMemoryStoreWorker implements Store {
131
131
await this . send ( 'resetKey' , [ key ] )
132
132
}
133
133
134
- private async send ( command : Command , args : any [ ] ) : Promise < any > {
134
+ private async send (
135
+ command : Command ,
136
+ args : any [ ] ,
137
+ timelimit = 1000 ,
138
+ ) : Promise < any > {
135
139
debug ( 'Sending command %s with args %o' , command , args )
136
140
return new Promise ( ( resolve , reject ) => {
137
141
const requestId = this . currentRequestId ++
138
- const timelimit = 1000
139
142
const timeoutId = setTimeout ( ( ) => {
140
143
reject (
141
144
new Error (
You can’t perform that action at this time.
0 commit comments