tls: fix lazy initialization of clienthello parser
authorFedor Indutny <fedor.indutny@gmail.com>
Tue, 6 Aug 2013 16:30:21 +0000 (20:30 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 6 Aug 2013 20:57:32 +0000 (00:57 +0400)
commit166c405b33320a0d6aceca6dc356fc26dc8a1da1
tree7369b181f4edf0775b3ed06d897ca44d66796fc9
parentb26d346b57fc1964bc4b20d522a7bc2b68edb1be
tls: fix lazy initialization of clienthello parser

`server.SNICallback` was initialized with `SNICallback.bind(this)`, and
therefore check `this.SNICallback === SNICallback` was always false, and
`_tls_wrap.js` always thought that it was a custom callback instead of
default one. Which in turn was causing clienthello parser to be enabled
regardless of presence of SNI contexts.
lib/_tls_wrap.js