When asynchronously parsing ClientHello for session resumption -
SNICallback may not be set. Check if it is present before invoking
it.
fix #7010
// session.
//
// Therefore we should account session loading when dealing with servername
- if (ret && ret.servername) {
+ if (!self._SNICallback) {
+ self.ssl.endParser();
+ } else if (ret && ret.servername) {
self._SNICallback(ret.servername, onSNIResult);
} else if (hello.servername && self._SNICallback) {
self._SNICallback(hello.servername, onSNIResult);
's_client',
'-tls1',
'-connect', 'localhost:' + common.PORT,
+ '-servername', 'ohgod',
'-key', join(common.fixturesDir, 'agent.key'),
'-cert', join(common.fixturesDir, 'agent.crt'),
'-reconnect'