Skip to content

Commit

Permalink
fix: Fix and optimize startup
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Mar 11, 2023
1 parent 20866d0 commit 253fb16
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/binary_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,14 @@ class BinaryEngine extends UniversalEngine implements Engine {
_listenStdout(process);

// Wait for ready.
final ready = await _waitPrismaServerReady();
if (!ready) {
throw throw PrismaInitializationException(
message: 'Cannot start the query engine',
engine: this,
);
if (await _waitPrismaServerReady()) {
return process;
}

return process;
throw PrismaInitializationException(
message: 'Cannot start the query engine',
engine: this,
);
}

/// Listen stdout.
Expand Down

1 comment on commit 253fb16

@vercel
Copy link

@vercel vercel bot commented on 253fb16 Mar 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.