@@ -127,9 +127,7 @@ export const EasyServer = function (config: any) {
127
127
await Files . copy ( validQueueFiles [ 0 ] . pathname , configJson ) ;
128
128
await Files . deletes ( validQueueFiles [ 0 ] . pathname ) ;
129
129
this . _controllerRunIfNeeded ( configJson , option ) ;
130
- return true ;
131
130
}
132
- return false ;
133
131
} ;
134
132
let timer = null ;
135
133
if ( option . timeout > 0 ) {
@@ -142,8 +140,8 @@ export const EasyServer = function (config: any) {
142
140
}
143
141
}
144
142
this . ServerApi . file . appendText ( this . ServerInfo . logFile , "timeout" , { isDataPath : true } ) ;
145
- if ( controllerWatching . resolve ) {
146
- controllerWatching . resolve ( undefined ) ;
143
+ if ( controllerWatching . reject ) {
144
+ controllerWatching . reject ( undefined ) ;
147
145
}
148
146
} , option . timeout * 1000 ) ;
149
147
}
@@ -191,8 +189,9 @@ export const EasyServer = function (config: any) {
191
189
clearTimeout ( timer ) ;
192
190
controller = null ;
193
191
hasMoreQueue ( )
194
- if ( controllerWatching . reject && ! controllerWatching . promiseResolved ) {
195
- controllerWatching . reject ( undefined ) ;
192
+ if ( controllerWatching . resolve && ! controllerWatching . promiseResolved ) {
193
+ controllerWatching . promiseResolved = true ;
194
+ controllerWatching . resolve ( undefined ) ;
196
195
}
197
196
} ,
198
197
error : ( _data , code ) => {
@@ -202,6 +201,7 @@ export const EasyServer = function (config: any) {
202
201
controller = null ;
203
202
hasMoreQueue ( )
204
203
if ( controllerWatching . reject && ! controllerWatching . promiseResolved ) {
204
+ controllerWatching . promiseResolved = true ;
205
205
controllerWatching . reject ( undefined ) ;
206
206
}
207
207
} ,
0 commit comments