tls: fix setting NPN protocols
authorFedor Indutny <fedor.indutny@gmail.com>
Mon, 9 Sep 2013 14:18:05 +0000 (18:18 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Mon, 9 Sep 2013 14:18:05 +0000 (18:18 +0400)
commit1c3863abfd40b2d95b7151a75427d9fd948e8e63
tree4d667488a5399f5412d43237d43fbd5a1757e436
parent3546825b1400dfead0d5f87dbd2278586ab4a9e2
tls: fix setting NPN protocols

The NPN protocols was set on `require('tls')` or `global` object instead
of being a local property. This fact lead to strange persistence of NPN
protocols, and sometimes incorrect protocol selection (when no NPN
protocols were passed in client options).

fix #6168
lib/tls.js
test/simple/test-tls-npn-server-client.js