Permalink
Browse files

[tls] do not call getNegotiatedProtocol on non-NPN_ENABLED node version

  • Loading branch information...
1 parent 0bb801f commit cc55ba7faaf5cb78259dde2a7e0fb76585f3d9e1 @indutny committed Apr 19, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/tls.js
View
@@ -610,7 +610,10 @@ SecurePair.prototype._cycle = function(depth) {
SecurePair.prototype._maybeInitFinished = function() {
if (this._ssl && !this._secureEstablished && this._ssl.isInitFinished()) {
- this.npnProtocol = this._ssl.getNegotiatedProtocol();
+ if (NPN_ENABLED) {
+ this.npnProtocol = this._ssl.getNegotiatedProtocol();
+ }
+
this._secureEstablished = true;
debug('secure established');
this.emit('secure');

0 comments on commit cc55ba7

Please sign in to comment.