File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -142,8 +142,7 @@ function run(options) {
142
142
143
143
// exit the monitor, but do it gracefully
144
144
if ( signal === 'SIGUSR2' ) {
145
- // restart
146
- restart ( ) ;
145
+ return restart ( ) ;
147
146
} else if ( code === 0 ) { // clean exit - wait until file change to restart
148
147
if ( runCmd ) {
149
148
utils . log . status ( 'clean exit - waiting for changes before restart' ) ;
@@ -161,13 +160,14 @@ function run(options) {
161
160
utils . log . fail ( 'app crashed - waiting for file changes before' +
162
161
' starting...' ) ;
163
162
child = null ;
164
- if ( config . options . restartable ) {
165
- // stdin needs to kick in again to be able to listen to the
166
- // restart command
167
- process . stdin . resume ( ) ;
168
- }
169
163
}
170
164
}
165
+
166
+ if ( config . options . restartable ) {
167
+ // stdin needs to kick in again to be able to listen to the
168
+ // restart command
169
+ process . stdin . resume ( ) ;
170
+ }
171
171
} ) ;
172
172
173
173
run . kill = function ( noRestart , callback ) {
You can’t perform that action at this time.
0 commit comments