mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 14:04:56 +00:00
30 lines
957 B
Diff
30 lines
957 B
Diff
diff --git a/node_modules/node-pty/src/win/conpty.cc b/node_modules/node-pty/src/win/conpty.cc
|
|
index c41796c..08c6439 100644
|
|
--- a/node_modules/node-pty/src/win/conpty.cc
|
|
+++ b/node_modules/node-pty/src/win/conpty.cc
|
|
@@ -107,9 +107,22 @@ void SetupExitCallback(Napi::Env env, Napi::Function cb, pty_baton* baton) {
|
|
CloseHandle(baton->hOut);
|
|
|
|
auto status = tsfn.BlockingCall(exit_event, callback); // In main thread
|
|
- assert(status == napi_ok);
|
|
+ switch (status) {
|
|
+ case napi_closing:
|
|
+ break;
|
|
|
|
- tsfn.Release();
|
|
+ case napi_queue_full:
|
|
+ Napi::Error::Fatal("SetupExitCallback", "Queue was full");
|
|
+
|
|
+ case napi_ok:
|
|
+ if (tsfn.Release() != napi_ok) {
|
|
+ Napi::Error::Fatal("SetupExitCallback", "ThreadSafeFunction.Release() failed");
|
|
+ }
|
|
+ break;
|
|
+
|
|
+ default:
|
|
+ Napi::Error::Fatal("SetupExitCallback", "ThreadSafeFunction.BlockingCall() failed");
|
|
+ }
|
|
});
|
|
}
|
|
|