diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2023-03-27 16:25:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 14:25:17 +0000 |
commit | 357bcfcf79fee92195e37bb3f05e247908f207c5 (patch) | |
tree | 0eddf89fc6b0971498bf56586a35bffa9a103efb /ext/node/polyfills/internal_binding/udp_wrap.ts | |
parent | 2b389ecf62f296712f0a3da488451ba6f19b43f7 (diff) |
Revert "refactor: remove Deno[Deno.internal].nodeUnstable namespace (… (#18458)
…#18449)"
This reverts commit d1a9c4cd7ce0c19ddf9c7c52c0d35d6124a7677d.
Appears this made CI very flaky on macOS, but I can't repeat it locally
yet
Diffstat (limited to 'ext/node/polyfills/internal_binding/udp_wrap.ts')
-rw-r--r-- | ext/node/polyfills/internal_binding/udp_wrap.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/node/polyfills/internal_binding/udp_wrap.ts b/ext/node/polyfills/internal_binding/udp_wrap.ts index 2b25ccb42..b36334a54 100644 --- a/ext/node/polyfills/internal_binding/udp_wrap.ts +++ b/ext/node/polyfills/internal_binding/udp_wrap.ts @@ -20,8 +20,6 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -const core = globalThis.Deno.core; -const ops = core.ops; import { AsyncWrap, providerType, @@ -34,13 +32,12 @@ import { notImplemented } from "ext:deno_node/_utils.ts"; import { Buffer } from "ext:deno_node/buffer.ts"; import type { ErrnoException } from "ext:deno_node/internal/errors.ts"; import { isIP } from "ext:deno_node/internal/net.ts"; -import * as net from "ext:deno_net/01_net.js"; + import { isLinux, isWindows } from "ext:deno_node/_util/os.ts"; -const DenoListenDatagram = net.createListenDatagram( - ops.op_node_unstable_net_listen_udp, - ops.op_node_unstable_net_listen_unixpacket, -); +// @ts-ignore Deno[Deno.internal] is used on purpose here +const DenoListenDatagram = Deno[Deno.internal]?.nodeUnstable?.listenDatagram || + Deno.listenDatagram; type MessageType = string | Uint8Array | Buffer | DataView; |