Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
avoid erroring when client disconnect abruptly in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 25, 2016
1 parent 4d52f97 commit 015bb32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/abstract_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ module.exports = function(moscaSettings, createConnection) {
callback(client);
});

function finish (err) {
function finish () {
client.removeListener('error', finish)
client.stream.removeListener('close', finish)
done(err)
done()
}
}

Expand Down

0 comments on commit 015bb32

Please sign in to comment.