mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
fix: use warnOnDeprecatedApi()
in Deno.TlsListener.rid
(#22089)
Missed in #22077
This commit is contained in:
parent
44f8b05f5b
commit
b1230586f8
1 changed files with 17 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue