Skip to content

Commit

Permalink
Lower timeout to 200ms
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Dec 8, 2017
1 parent 0a6d921 commit 423cad1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unixTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const pty = require(path.join('..', 'build', 'Release', 'pty.node'));

const DEFAULT_FILE = 'sh';
const DEFAULT_NAME = 'xterm';
const DESTROY_SOCKET_TIMEOUT_MS = 200;

export class UnixTerminal extends Terminal {
protected _fd: number;
Expand Down Expand Up @@ -85,7 +86,7 @@ export class UnixTerminal extends Terminal {
timeout = null;
// Destroying the socket now will cause the close event to fire
this._socket.destroy();
}, 1000);
}, DESTROY_SOCKET_TIMEOUT_MS);
this.once('close', () => {
if (timeout !== null) {
clearTimeout(timeout);
Expand Down

0 comments on commit 423cad1

Please sign in to comment.