diff options
Diffstat (limited to 'src/tls_wrap.cc')
-rw-r--r-- | src/tls_wrap.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index e467e2d167..fdd51dc57b 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -792,6 +792,11 @@ void TLSWrap::EnableSessionCallbacks( ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); CHECK_NOT_NULL(wrap->ssl_); wrap->enable_session_callbacks(); + + // Clients don't use the HelloParser. + if (wrap->is_client()) + return; + crypto::NodeBIO::FromBIO(wrap->enc_in_)->set_initial(kMaxHelloLength); wrap->hello_parser_.Start(SSLWrap<TLSWrap>::OnClientHello, OnClientHelloParseEnd, |