@@ -127,9 +127,7 @@ export const EasyServer = function (config: any) {
127127 await Files . copy ( validQueueFiles [ 0 ] . pathname , configJson ) ;
128128 await Files . deletes ( validQueueFiles [ 0 ] . pathname ) ;
129129 this . _controllerRunIfNeeded ( configJson , option ) ;
130- return true ;
131130 }
132- return false ;
133131 } ;
134132 let timer = null ;
135133 if ( option . timeout > 0 ) {
@@ -142,8 +140,8 @@ export const EasyServer = function (config: any) {
142140 }
143141 }
144142 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 ) ;
147145 }
148146 } , option . timeout * 1000 ) ;
149147 }
@@ -191,8 +189,9 @@ export const EasyServer = function (config: any) {
191189 clearTimeout ( timer ) ;
192190 controller = null ;
193191 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 ) ;
196195 }
197196 } ,
198197 error : ( _data , code ) => {
@@ -202,6 +201,7 @@ export const EasyServer = function (config: any) {
202201 controller = null ;
203202 hasMoreQueue ( )
204203 if ( controllerWatching . reject && ! controllerWatching . promiseResolved ) {
204+ controllerWatching . promiseResolved = true ;
205205 controllerWatching . reject ( undefined ) ;
206206 }
207207 } ,
0 commit comments