0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

fix: use warnOnDeprecatedApi() in Deno.TlsListener.rid (#22089)

Missed in #22077
This commit is contained in:
Asher Gomez 2024-01-25 09:50:33 +11:00 committed by GitHub
parent 44f8b05f5b
commit b1230586f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,9 +75,25 @@ async function connectTls({
}
class TlsListener extends Listener {
#rid = 0;
constructor(rid, addr) {
super(rid, addr);
this.#rid = rid;
}
get rid() {
internals.warnOnDeprecatedApi(
"Deno.TlsListener.rid",
new Error().stack,
"Use `Deno.TlsListener` instance methods instead.",
);
return this.#rid;
}
async accept() {
const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_net_accept_tls(
this.rid,
this.#rid,
);
localAddr.transport = "tcp";
remoteAddr.transport = "tcp";