(changedPath)
| 176 | }); |
| 177 | } |
| 178 | |
| 179 | function restartServer(changedPath) { |
| 180 | restartInProgress = true; |
| 181 | const label = path.relative(packageRoot, changedPath) || changedPath; |
| 182 | log(`restarting due to ${label}`); |
| 183 | |
| 184 | if (!child) { |
| 185 | startServer(); |
| 186 | restartInProgress = false; |
| 187 | return; |
| 188 | } |
| 189 | |
| 190 | const childToRestart = child; |
| 191 | restartAfterExit = true; |
| 192 | void stopBackendAndWait(childToRestart); |
| 193 | } |
| 194 | |
| 195 | function shutdown(signal) { |
| 196 | if (shuttingDown) { |
| 197 | return; |
| 198 | } |
| 199 | |
| 200 | shuttingDown = true; |
| 201 |
no test coverage detected