Skip to content

Commit

Permalink
ignore server PID check when running on Windows (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
scholarsmate authored Apr 13, 2023
1 parent 37076e7 commit ea6d225
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/client/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ export async function startServer(
await waitForFileToExist(pidFile)

const pidFromFile = Number(fs.readFileSync(pidFile).toString())
if (pidFromFile !== pid) {

// NOTE: The server wrapper script and the actual server process have different PIDs in Windows, so this check is
// only valid for non-Windows platforms. The PID in the pidFile ought to be correct on all platforms.
if (pidFromFile !== pid && process.platform !== 'win32') {
getLogger().error({
fn: 'startServer',
err: {
Expand Down

0 comments on commit ea6d225

Please sign in to comment.