forked from svrjs/svrjs
Errors that occurred while adding SNI context to a server are now ignored.
This commit is contained in:
parent
9eb982dc92
commit
7dfdc7209e
1 changed files with 16 additions and 12 deletions
4
svr.js
4
svr.js
|
@ -2177,6 +2177,7 @@ if (!cluster.isPrimary) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (secure) {
|
if (secure) {
|
||||||
|
try {
|
||||||
sniCredentials.forEach(function (sniCredentialsSingle) {
|
sniCredentials.forEach(function (sniCredentialsSingle) {
|
||||||
server.addContext(sniCredentialsSingle.name, {
|
server.addContext(sniCredentialsSingle.name, {
|
||||||
cert: sniCredentialsSingle.cert,
|
cert: sniCredentialsSingle.cert,
|
||||||
|
@ -2190,6 +2191,9 @@ if (!cluster.isPrimary) {
|
||||||
// Can't replace regex, ignoring...
|
// Can't replace regex, ignoring...
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} catch (err) {
|
||||||
|
// SNI error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
server.on("request", reqhandler);
|
server.on("request", reqhandler);
|
||||||
server.on("checkExpectation", reqhandler);
|
server.on("checkExpectation", reqhandler);
|
||||||
|
|
Reference in a new issue