mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
grpc-js: Add secureConnection error handling in server
This commit is contained in:
parent
903cce1df9
commit
db56e80b21
@ -371,6 +371,13 @@ export class Server {
|
||||
creds._getSettings()!
|
||||
);
|
||||
http2Server = http2.createSecureServer(secureServerOptions);
|
||||
http2Server.on('secureConnection', (socket: TLSSocket) => {
|
||||
/* These errors need to be handled by the user of Http2SecureServer,
|
||||
* according to https://github.com/nodejs/node/issues/35824 */
|
||||
socket.on('error', (e: Error) => {
|
||||
this.trace('An incoming TLS connection closed with error: ' + e.message);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
http2Server = http2.createServer(serverOptions);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user