zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.48k stars 210 forks source link

Proxy not working from version v6.0.0-beta.20 to v6.0.8 #662

Closed dhilip89 closed 1 week ago

dhilip89 commented 3 weeks ago

Describe the bug Proxy is throwing different error on different environment with the version (from v6.0.0-beta.20 to v6.0.8), it was working fine in v6.0.0-beta.19.

On Windows machine:

Waiting for the debugger to disconnect... node:internal/process/promises:289 triggerUncaughtException(err, true / fromPromise /); ^

[Error: Unknown error] { errno: 10045, code: '' }

On Ubuntu machine:

Debugger attached. Waiting for the debugger to disconnect... node:internal/process/promises:391 triggerUncaughtException(err, true / fromPromise /); ^

[Error: Operation not supported] { errno: 95, code: 'ENOTSUP' }

Reproducing Using example from the official documentation:

import { Proxy, Router, Dealer } from "zeromq"

// Proxy between a router/dealer socket for 5 seconds.
const proxy = new Proxy(new Router, new Dealer)
await proxy.frontEnd.bind("tcp://*:3001")
await proxy.backEnd.bind("tcp://*:3002")
setTimeout(() => proxy.terminate(), 5000)
await proxy.run() // <-- This line throws unknown error on Windows, ENOTSUP on Linux

Downgrade zeromq.js to v6.0.0-beta.19 then the code will not throw error.

Expected behavior Proxy should be working correctly without throwing error like with previous version.

Tested on

aminya commented 1 week ago

@dhilip89 Could you confirm that the latest release fixed this or not?

dhilip89 commented 1 week ago

@dhilip89 Could you confirm that the latest release fixed this or not?

Just upgraded to latest version (6.1.1), everything seems working as expected on both Windows and Linux machines.

aminya commented 1 week ago

Awesome! Thanks for confirming