node-pty 0.11.0-beta10 → 0.11.0-beta11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "Microsoft Corporation"
6
6
  },
7
- "version": "0.11.0-beta10",
7
+ "version": "0.11.0-beta11",
8
8
  "license": "MIT",
9
9
  "main": "./lib/index.js",
10
10
  "types": "./typings/node-pty.d.ts",
package/src/win/conpty.cc CHANGED
@@ -318,8 +318,8 @@ static NAN_METHOD(PtyConnect) {
318
318
  auto envV = vectorFromString(env);
319
319
  LPWSTR envArg = envV.empty() ? nullptr : envV.data();
320
320
 
321
- BOOL success = ConnectNamedPipe(handle->hIn, nullptr);
322
- success = ConnectNamedPipe(handle->hOut, nullptr);
321
+ ConnectNamedPipe(handle->hIn, nullptr);
322
+ ConnectNamedPipe(handle->hOut, nullptr);
323
323
 
324
324
  // Attach the pseudoconsole to the client application we're creating
325
325
  STARTUPINFOEXW siEx{0};
@@ -442,6 +442,10 @@ static NAN_METHOD(PtyKill) {
442
442
  }
443
443
  }
444
444
 
445
+ DisconnectNamedPipe(handle->hIn);
446
+ DisconnectNamedPipe(handle->hOut);
447
+ CloseHandle(handle->hIn);
448
+ CloseHandle(handle->hOut);
445
449
  CloseHandle(handle->hShell);
446
450
  }
447
451