Skip to content

Commit

Permalink
cli: workaround wrtc segfault on pc.close
Browse files Browse the repository at this point in the history
  • Loading branch information
andrevmatos committed Oct 6, 2020
1 parent 05c12f1 commit 8a1a014
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion raiden-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function shutdownRaiden(this: Cli): void {
this.log.info('Stopping raiden...');
this.raiden.stop();
// force-exit at most 5s after stopping raiden
unrefTimeout(setTimeout(() => process.exit(0), 5000));
unrefTimeout(setTimeout(() => process.exit(0), 10000));
} else {
process.exit(1);
}
Expand Down
8 changes: 7 additions & 1 deletion raiden-ts/src/transport/epics/webrtc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@ function listenDataChannel(
);
}),
),
).pipe(finalize(() => (dataChannel.close(), connection.close()))),
).pipe(
finalize(() => {
dataChannel.close();
// FIXME: https://github.com/node-webrtc/node-webrtc/issues/636
// connection.close();
}),
),
),
);
}
Expand Down

0 comments on commit 8a1a014

Please sign in to comment.