Open
Description
From cloudflare/workerd#1305 we've realised that we should define what should happen when close
is called on a socket that already had its closed
promise rejected.
When the closed
promise is resolved then the answer is easy: close
does nothing.
But when closed
is rejected, we have a couple of options:
close
throws the exception inclosed
close
doesn't throw and leaves theclosed
promise unchanged (so it remains rejected)
Workerd currently does a third option, which I think just leads to gotchas so I want to change it, where close
doesn't throw but also resolves the closed
promise which means the exception can be lost.
Metadata
Metadata
Assignees
Labels
No labels