rabbit.js
rabbit.js copied to clipboard
Connect callback not optional
Documentation states socket.connect(address [, connectedCallback]), yet while the sub socket connect callback is indeed optional, the pub socket connect callback is not optional, and if you only do this:
pub.connect('socket')
It will fail with this error:
timers.js:534
immediate._onImmediate();
^
TypeError: immediate._onImmediate is not a function
at tryOnImmediate (timers.js:534:15)
at processImmediate [as _immediateCallback] (timers.js:514:5)
Specifying a callback function fixes the issue.