tls: server: Minor code style changes

This commit is contained in:
Martin Rubli 2024-05-31 21:57:59 +02:00
parent 7dcbd21454
commit 58f45135b3

View file

@ -4,7 +4,6 @@ const net = require("net");
const tls = require("tls"); const tls = require("tls");
class TlsMonitorType extends MonitorType { class TlsMonitorType extends MonitorType {
name = "port-tls"; name = "port-tls";
/** /**
@ -66,7 +65,8 @@ class TlsMonitorType extends MonitorType {
if (response instanceof Error) { if (response instanceof Error) {
this.log("check failed: " + response.message); this.log("check failed: " + response.message);
throw response; throw response;
} else { }
let success = false; let success = false;
let message = undefined; let message = undefined;
if (monitor.keyword) { if (monitor.keyword) {
@ -87,7 +87,6 @@ class TlsMonitorType extends MonitorType {
throw new Error(message); throw new Error(message);
} }
} }
}
/** /**
* Sends the request over the given TLS socket and returns the response. * Sends the request over the given TLS socket and returns the response.