Skip to content

Commit

Permalink
tls: destroy connection when client handshaking error
Browse files Browse the repository at this point in the history
Change-Id: Ib49c66bc25a97cfd29e7551a84cd1d65dd585e34
  • Loading branch information
cynron committed Dec 31, 2015
1 parent 7c84e81 commit baf7e4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/connectors/hybrid/switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ var Switcher = function(server, opts) {
this.server.on('connection', this.newSocket.bind(this));
} else {
this.server.on('secureConnection', this.newSocket.bind(this));
this.server.on('clientError', function(e) {
this.server.on('clientError', function(e, tlsSo) {
logger.warn('an ssl error occured before handshake established: ', e);
tlsSo.destroy();
});
}

Expand Down

0 comments on commit baf7e4e

Please sign in to comment.