error: BadResource: Bad resource ID
I'm writing tests for https://github.com/deno-libs/tinyhttp/pull/9.
When running this test I get either this:
or this, if I uncomment that line:
GitHub
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 330 million projects.
8 Replies
what I'm trying to do is to close the server once a request has been done
conn.close()
would be the normal API to close the connection, I think.conn.close emits the same error as Deno.close(conn.rid)
Hmm... Maybe await the respondWith ... Not sure though.
I fixed with
Deno.close(conn.rid + 1)
... weird but it worksThat sounds absolutely dirty, unsafe and unsound 😄
Not to kick you down of course, just that calculating another rid from one is probably really easy to break semi-randomly.
well nothing else worked lol
Yeah.