Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Add an hack in order to destroy the socket on parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Skywalker13 committed Jan 14, 2017
1 parent f884add commit f9bcf27
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ class Runner extends EventEmitter {
this._frames[line].push (frame);
this.emit ('frame', frame);

/* HACK: it stucks forever on parsing issues...
* See https://github.com/nodejs/node/issues/1788
*/
if (/^Unexpected token/.test (text) && exception.type === 'error') {
this._client.destroy ();
}

next ();
}

Expand Down

0 comments on commit f9bcf27

Please sign in to comment.