mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-03 16:05:56 +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 || ""),
|
||||
};
|
||||
|
||||
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;
|
||||
tlsSocket.on("close", () => {
|
||||
tlsSocketClosed = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue