summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorYusuke Tanaka <yusuktan@maguro.dev>2022-10-18 11:28:27 +0900
committerGitHub <noreply@github.com>2022-10-18 11:28:27 +0900
commit44a89dd6dc7864822ddb48d030af519160de90a2 (patch)
tree3a7fe40040372d6118a86276d7d91317ab026de5 /cli/dts/lib.deno.ns.d.ts
parent74be01273c16b83b1063da1750045b12e095f0c3 (diff)
fix(ext/net): return an error from `startTls` and `serveHttp` if the original connection is captured elsewhere (#16242)
This commit removes the calls to `expect()` on `std::rc::Rc`, which caused Deno to panic under certain situations. We now return an error if `Rc` is referenced by other variables. Fixes #9360 Fixes #13345 Fixes #13926 Fixes #16241 Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index 9c645882d..c01ac80fb 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -4017,6 +4017,14 @@ declare namespace Deno {
* }
* ```
*
+ * Note that this function *consumes* the given connection passed to it, thus the
+ * original connection will be unusable after calling this. Additionally, you
+ * need to ensure that the connection is not being used elsewhere when calling
+ * this function in order for the connection to be consumed properly.
+ * For instance, if there is a `Promise` that is waiting for read operation on
+ * the connection to complete, it is considered that the connection is being
+ * used elsewhere. In such a case, this function will fail.
+ *
* @category HTTP Server
*/
export function serveHttp(conn: Conn): HttpConn;