Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using bad url doesn't throw error. #574

Open
coolaj86 opened this issue Jun 20, 2023 · 0 comments
Open

Using bad url doesn't throw error. #574

coolaj86 opened this issue Jun 20, 2023 · 0 comments
Labels

Comments

@coolaj86
Copy link

Describe the bug

When using a bad URL I would expect a failure, but instead nothing happens.

Reproducing

npm install --save zeromq@5
  //  note the invalid `.1041`
  var zmqUrl = 'tcp://10.0.0.1041:28332';
  var zmq = require('zeromq');
  var zmqSubSocket = zmq.socket('sub');

  zmqSubSocket.on('connect', function(fd, endPoint) {
    console.info('ZMQ connected to:', endPoint);
  });

  zmqSubSocket.on('connect_delay', function(fd, endPoint) {
    console.warn('ZMQ connection delay:', endPoint);
  });

  zmqSubSocket.on('disconnect', function(fd, endPoint) {
    console.warn('ZMQ disconnect:', endPoint);
  });

  zmqSubSocket.on('monitor_error', function(err) {
    console.error('Error in monitoring: %s, will restart monitoring in 5 seconds', err);
  });

  zmqSubSocket.monitor(500, 0);
  zmqSubSocket.connect(zmqUrl);
node ./test.js

# just sits there and hangs

Expected behavior

An error should be thrown.

Tested on

  • OS: Ubuntu 22.04 LTS
  • ZeroMQ.js version: 5.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant