You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consturl="http://127.0.0.1:4246";constclient=http2.connect(url)// leave a request open to prevent immediate destroyconstreq=client.request();req.on("data",()=>{});req.on("error",(err)=>console.error(err));constreqClosePromise=Promise.withResolvers<void>();req.on("close",()=>{reqClosePromise.resolve()});client.close();awaitreqClosePromise.promise
Throws:
error: (in promise) BadResource: Bad resource ID
I will send a PR with a test and a fix
The text was updated successfully, but these errors were encountered:
Note: It looks that the example needs to be like the below to cause BadResource: Bad resource ID:
importhttp2from"node:http2";consturl="http://127.0.0.1:4246";constconnectPromise=Promise.withResolvers();constclient=http2.connect(url,{},()=>{connectPromise.resolve();})awaitconnectPromise.promise// leave a request open to prevent immediate destroyconstreq=client.request();req.on("data",()=>{});req.on("error",(err)=>console.error(err));constreqClosePromise=Promise.withResolvers();req.on("close",()=>{reqClosePromise.resolve()});client.close();awaitreqClosePromise.promise
Version: Deno 1.46.0
Throws:
I will send a PR with a test and a fix
The text was updated successfully, but these errors were encountered: