mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-04 00:15:57 +00:00
tls: server: Clean up when TLS connection fails to establish
This commit is contained in:
parent
ddd7abb05d
commit
89eff42e91
1 changed files with 7 additions and 1 deletions
|
@ -61,7 +61,13 @@ class TlsMonitorType extends MonitorType {
|
||||||
response: unescape(monitor.tcpStartTlsResponse || ""),
|
response: unescape(monitor.tcpStartTlsResponse || ""),
|
||||||
};
|
};
|
||||||
|
|
||||||
const tlsSocket = await this.connect(abortController.signal, tlsOptions);
|
const tlsSocket = await this.connect(abortController.signal, tlsOptions)
|
||||||
|
.catch((error) => {
|
||||||
|
abortController.abort();
|
||||||
|
clearTimeout(timeoutID);
|
||||||
|
throw error;
|
||||||
|
})
|
||||||
|
;
|
||||||
let tlsSocketClosed = false;
|
let tlsSocketClosed = false;
|
||||||
tlsSocket.on("close", () => {
|
tlsSocket.on("close", () => {
|
||||||
tlsSocketClosed = true;
|
tlsSocketClosed = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue