Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import zmq from 'zeromq'
zmq.Context.setMaxThreads(8)
let getMaxThreads = zmq.Context.getMaxThreads()
let getMaxSockets = zmq.Context.getMaxSockets()
console.log('getMaxThreads', getMaxThreads)
console.log('getMaxSockets', getMaxSockets)
let dealer1 = zmq.socket('dealer')
let dealer2 = zmq.socket('dealer')
let router1 = zmq.socket('router')
let router2 = zmq.socket('router')
// ** BUG scenario
// router1.monitor(10, 0)
// router2.monitor(10, 0)
// dealer1.monitor(10, 0)
// dealer2.monitor(10, 0)
import zmq from 'zeromq'
zmq.Context.setMaxThreads(8)
let getMaxThreads = zmq.Context.getMaxThreads()
let getMaxSockets = zmq.Context.getMaxSockets()
console.log('getMaxThreads', getMaxThreads)
console.log('getMaxSockets', getMaxSockets)
let dealer1 = zmq.socket('dealer')
let dealer2 = zmq.socket('dealer')
let router1 = zmq.socket('router')
let router2 = zmq.socket('router')
// ** BUG scenario
// router1.monitor(10, 0)
// router2.monitor(10, 0)