Skip to content

Commit af76abd

Browse files
authored
fix: set process.stdout._handle.setBlocking(true) on ffi init (#510)
fixes pact-foundation/pact-js#1216 Large number of pact verifications fail when run in parallel
1 parent 3515c11 commit af76abd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ffi/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ let ffi: typeof ffiLib;
8888
let ffiLogLevel: LogLevel;
8989

9090
const initialiseFfi = (logLevel: LogLevel): typeof ffi => {
91+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
92+
// @ts-ignore
93+
if (process.stdout._handle) {
94+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
95+
// @ts-ignore
96+
process.stdout._handle.setBlocking(true);
97+
}
9198
logger.debug(`Initalising native core at log level '${logLevel}'`);
9299
ffiLogLevel = logLevel;
93100
try {

0 commit comments

Comments
 (0)